Lines 350-363
sub output_and_exit_if_error {
Link Here
|
350 |
$error = 'unknown_biblio' unless $params->{record}; |
350 |
$error = 'unknown_biblio' unless $params->{record}; |
351 |
} |
351 |
} |
352 |
} |
352 |
} |
353 |
elsif ( $params->{check} eq 'csrf_token' ) { |
353 |
elsif ( $params and exists $params->{check} ) { |
354 |
$error = 'wrong_csrf_token' |
354 |
if ( $params->{check} eq 'csrf_token' ) { |
355 |
unless Koha::Token->new->check_csrf( |
355 |
$error = 'wrong_csrf_token' |
356 |
{ |
356 |
unless Koha::Token->new->check_csrf( |
357 |
session_id => scalar $query->cookie('CGISESSID'), |
357 |
{ |
358 |
token => scalar $query->param('csrf_token'), |
358 |
session_id => scalar $query->cookie('CGISESSID'), |
359 |
} |
359 |
token => scalar $query->param('csrf_token'), |
360 |
); |
360 |
} |
|
|
361 |
); |
362 |
} |
361 |
} |
363 |
} |
362 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
364 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
363 |
return; |
365 |
return; |
364 |
- |
|
|