Lines 29-35
use Koha::Illcomment;
Link Here
|
29 |
use Koha::Illrequests; |
29 |
use Koha::Illrequests; |
30 |
use Koha::Illrequest::Availability; |
30 |
use Koha::Illrequest::Availability; |
31 |
use Koha::Libraries; |
31 |
use Koha::Libraries; |
32 |
use Koha::Token; |
|
|
33 |
|
32 |
|
34 |
use Try::Tiny qw( catch try ); |
33 |
use Try::Tiny qw( catch try ); |
35 |
use URI::Escape qw( uri_escape_utf8 ); |
34 |
use URI::Escape qw( uri_escape_utf8 ); |
Lines 382-391
if ( $backends_available ) {
Link Here
|
382 |
prefilters => join("&", @tpl_arr) |
381 |
prefilters => join("&", @tpl_arr) |
383 |
); |
382 |
); |
384 |
} elsif ( $op eq "save_comment" ) { |
383 |
} elsif ( $op eq "save_comment" ) { |
385 |
die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ |
|
|
386 |
session_id => scalar $cgi->cookie('CGISESSID'), |
387 |
token => scalar $cgi->param('csrf_token'), |
388 |
}); |
389 |
my $comment = Koha::Illcomment->new({ |
384 |
my $comment = Koha::Illcomment->new({ |
390 |
illrequest_id => scalar $params->{illrequest_id}, |
385 |
illrequest_id => scalar $params->{illrequest_id}, |
391 |
borrowernumber => $patronnumber, |
386 |
borrowernumber => $patronnumber, |