|
Lines 349-364
sub output_and_exit_if_error {
Link Here
|
| 349 |
# But in the long term we will want to get a biblio in parameter |
349 |
# But in the long term we will want to get a biblio in parameter |
| 350 |
$error = 'unknown_biblio' unless $params->{record}; |
350 |
$error = 'unknown_biblio' unless $params->{record}; |
| 351 |
} |
351 |
} |
| 352 |
elsif ( $params->{module} eq 'CSRF_TOKEN_CHECK' ) { |
352 |
} |
| 353 |
$error = 'wrong_csrf_token' |
353 |
elsif ( $params->{check} eq 'csrf_token' ) { |
| 354 |
unless Koha::Token->new->check_csrf( |
354 |
$error = 'wrong_csrf_token' |
| 355 |
{ |
355 |
unless Koha::Token->new->check_csrf( |
| 356 |
session_id => scalar $query->cookie('CGISESSID'), |
356 |
{ |
| 357 |
token => scalar $query->param('csrf_token'), |
357 |
session_id => scalar $query->cookie('CGISESSID'), |
| 358 |
} |
358 |
token => scalar $query->param('csrf_token'), |
| 359 |
); |
|
|
| 360 |
} |
359 |
} |
| 361 |
} |
360 |
); |
| 362 |
} |
361 |
} |
| 363 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
362 |
output_and_exit( $query, $cookie, $template, $error ) if $error; |
| 364 |
return; |
363 |
return; |