Bug 20701: (17.11 follow-up) Move csrf token after checkauth and use
scalar Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
873da065b8
commit
5f846a33ab
|
|
@ -55,7 +55,7 @@ if ($add){
|
|||
|
||||
die "Wrong CSRF token"
|
||||
unless Koha::Token->new->check_csrf( {
|
||||
session_id => $input->cookie('CGISESSID'),
|
||||
session_id => scalar $input->cookie('CGISESSID'),
|
||||
token => scalar $input->param('csrf_token'),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@ unless ( $patron ) {
|
|||
|
||||
my $add=$input->param('add');
|
||||
if ($add){
|
||||
die "Wrong CSRF token"
|
||||
unless Koha::Token->new->check_csrf( {
|
||||
session_id => $input->cookie('CGISESSID'),
|
||||
token => scalar $input->param('csrf_token'),
|
||||
});
|
||||
if ( checkauth( $input, 0, $flagsrequired, 'intranet' ) ) {
|
||||
die "Wrong CSRF token"
|
||||
unless Koha::Token->new->check_csrf( {
|
||||
session_id => scalar $input->cookie('CGISESSID'),
|
||||
token => scalar $input->param('csrf_token'),
|
||||
});
|
||||
# print $input->header;
|
||||
my $barcode=$input->param('barcode');
|
||||
my $itemnum;
|
||||
|
|
|
|||
Loading…
Reference in New Issue