Bug 20701: (17.11 follow-up) Move csrf token after checkauth and use
scalar (cherry picked from commit 8bbc2f481037867bc188a0c1f27f06205d3c4bfa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
599c93ef10
commit
501ad2508a
|
|
@ -52,7 +52,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'),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ my $borrowernumber=$input->param('borrowernumber');
|
|||
my $data=GetMember('borrowernumber'=>$borrowernumber);
|
||||
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