use CGI qw ( -utf8 );
use Digest::MD5 qw(md5_base64);
+use Encode qw( encode );
use C4::Context;
use C4::Output;
use C4::Auth;
op => 'delete_confirm',
csrf_token => Koha::Token->new->generate_csrf(
{ id => C4::Context->userenv->{id},
- secret => md5_base64( C4::Context->config('pass') ),
+ secret => md5_base64( Encode::encode( 'UTF-8', C4::Context->config('pass') ) ),
}
),
);
die "Wrong CSRF token"
unless Koha::Token->new->check_csrf({
id => C4::Context->userenv->{id},
- secret => md5_base64( C4::Context->config('pass') ),
+ secret => md5_base64( Encode::encode( 'UTF-8', C4::Context->config('pass') ) ),
token => scalar $input->param('csrf_token'),
});
my $patron = Koha::Patrons->find( $member );