Bug 34478: (follow-up) Remove check_csrf from pl files

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-09 11:02:51 +01:00
parent 17ec52961c
commit bc2bb89930
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 0 additions and 17 deletions

View file

@ -117,11 +117,6 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) {
);
} elsif ( $op eq 'cud-delete_confirmed' ) {
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
unless Koha::Token->new->check_csrf( {
session_id => $input->cookie('CGISESSID'),
token => scalar $input->param('csrf_token'),
});
my $patron = Koha::Patrons->find( $member );

View file

@ -87,12 +87,6 @@ our %errors = ();
# Case is important in these operational values as the template must use case to be visually pleasing!
if ( ( $op eq 'cud-Upload' ) && ($uploadfile || $uploadfiletext) ) {
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
unless Koha::Token->new->check_csrf({
session_id => scalar $input->cookie('CGISESSID'),
token => scalar $input->param('csrf_token'),
});
my $dirname = File::Temp::tempdir( CLEANUP => 1 );
my $filesuffix;
if ( $uploadfilename =~ m/(\..+)$/i ) {
@ -191,12 +185,6 @@ elsif ( ( $op eq 'cud-Upload' ) && !$uploadfile ) {
$template->param( filetype => $filetype );
}
elsif ( $op eq 'Delete' ) {
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
unless Koha::Token->new->check_csrf({
session_id => scalar $input->cookie('CGISESSID'),
token => scalar $input->param('csrf_token'),
});
my $deleted = eval {
Koha::Patron::Images->find( $borrowernumber )->delete;
};