|
Lines 341-354
sub output_and_exit_if_error {
Link Here
|
| 341 |
$error = 'unknown_biblio' unless $params->{record}; |
341 |
$error = 'unknown_biblio' unless $params->{record}; |
| 342 |
} |
342 |
} |
| 343 |
} |
343 |
} |
| 344 |
elsif ( $params->{check} eq 'csrf_token' ) { |
344 |
elsif ( $params and exists $params->{check} ) { |
| 345 |
$error = 'wrong_csrf_token' |
345 |
if ( $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 |
); |
| 353 |
} |
| 352 |
} |
354 |
} |
| 353 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
355 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
| 354 |
return; |
356 |
return; |
| 355 |
- |
|
|