View | Details | Raw Unified | Return to bug 29915
Collapse All | Expand All

(-)a/t/db_dependent/Auth.t (-1 / +5 lines)
Lines 602-607 subtest 'checkauth & check_cookie_auth' => sub { Link Here
602
        ( $auth_status, $session) = C4::Auth::check_cookie_auth( $first_sessionID, { borrowers => 1 } );
602
        ( $auth_status, $session) = C4::Auth::check_cookie_auth( $first_sessionID, { borrowers => 1 } );
603
        is( $auth_status, 'expired', 'Session no longer exists' );
603
        is( $auth_status, 'expired', 'Session no longer exists' );
604
604
605
        # NOTE: It is not what the UI is doing.
606
        # From the UI we are allowed to hit an unauthorized page then reuse the session to hit back authorized area.
607
        # It is because check_cookie_auth is ALWAYS called from checkauth WITHOUT $flagsrequired
608
        # It then return "ok", when the previous called got "failed"
609
605
        # Try reusing the deleted session: since it does not exist, we should get a new one now when passing correct permissions
610
        # Try reusing the deleted session: since it does not exist, we should get a new one now when passing correct permissions
606
        $cgi->cookie( -name => 'CGISESSID', value => $first_sessionID );
611
        $cgi->cookie( -name => 'CGISESSID', value => $first_sessionID );
607
        ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth($cgi, 0, {catalogue => 1});
612
        ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth($cgi, 0, {catalogue => 1});
608
- 

Return to bug 29915