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