[Koha-bugs] [Bug 27849] Koha::Token may access undefined C4::Context->userenv

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun May 2 05:57:04 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27849

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |victor at tuxayo.net

--- Comment #2 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Saluton :)

Ĉu estas bona maniero por testi?
Is that a good way to test:

Add the following code:
        Koha::Token->new->check_csrf({
            session_id => scalar $query->cookie('CGISESSID'),
            token  => scalar $query->param('csrf_token'),
        });

In opac/opac-user.pl

After
C4::Context->preference('casAuthentication') and
C4::Auth_with_cas::logout_if_required($query);

And before
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(

It seems to be the case since it crashes without the patch and work with it.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list