Lines 340-355
sub output_and_exit_if_error {
Link Here
|
340 |
{ |
340 |
{ |
341 |
$error = 'cannot_see_patron_infos'; |
341 |
$error = 'cannot_see_patron_infos'; |
342 |
} |
342 |
} |
343 |
} |
343 |
} |
344 |
elsif ( $params->{module} eq 'CSRF_TOKEN_CHECK' ) { |
344 |
} elsif ( $params->{check} eq 'csrf_token' ) { |
345 |
$error = 'wrong_csrf_token' |
345 |
$error = 'wrong_csrf_token' |
346 |
unless Koha::Token->new->check_csrf( |
346 |
unless Koha::Token->new->check_csrf( |
347 |
{ |
347 |
{ |
348 |
session_id => scalar $query->cookie('CGISESSID'), |
348 |
session_id => scalar $query->cookie('CGISESSID'), |
349 |
token => scalar $query->param('csrf_token'), |
349 |
token => scalar $query->param('csrf_token'), |
350 |
} |
350 |
} |
351 |
); |
351 |
); |
352 |
} |
|
|
353 |
} |
352 |
} |
354 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
353 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
355 |
return; |
354 |
return; |