Bug 21993: Display a user-friendly message when the CSRF token is wrong
[koha.git] / members / member-password.pl
index 34795c3..013e7e5 100755 (executable)
@@ -64,7 +64,7 @@ push( @errors, 'NOMATCH' ) if ( ( $newpassword && $newpassword2 ) && ( $newpassw
 
 if ( $newpassword and not @errors) {
 
-    die "Wrong CSRF token"
+    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'),