From fd5e11dad2a5c918651ca895c781d5f3b6fdf2d8 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 16 Aug 2016 14:20:36 +0200 Subject: [PATCH] Bug 17109: [QA Follow-up] Die when wrong token Removes template var csrf_error and associated handling. Signed-off-by: Marcel de Rooy Restested with opac and intranet: Still sends or dies elegantly.. Signed-off-by: Jonathan Druart --- basket/sendbasket.pl | 1 - .../intranet-tmpl/prog/en/modules/basket/sendbasketform.tt | 4 ---- .../opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt | 4 ---- opac/opac-sendbasket.pl | 1 - 4 files changed, 10 deletions(-) diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index d5cbb72355..6332727716 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -50,7 +50,6 @@ my $email_add = $query->param('email_add'); my $dbh = C4::Context->dbh; -my $csrf_err; if ( $email_add ) { die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ session_id => scalar $query->cookie('CGISESSID'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tt index 07d004d341..b78a650ac8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tt @@ -10,10 +10,6 @@

The cart was sent to: [% email_add |html %]

Close window

[% END %] - [% IF csrf_error %] -

No valid CSRF token!

-

Close window

- [% END %] [% IF ( error ) %]

Problem sending the cart...

[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt index e1f8f60df6..fed5013093 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt @@ -19,10 +19,6 @@

Close window

[% END %] - [% IF csrf_error %] -

No valid CSRF token!

-

Close window

- [% END %] [% IF ( error ) %]

There was an error sending the cart.

diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index c1bbaaa9c9..dd018fac53 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -52,7 +52,6 @@ my $email_add = $query->param('email_add'); my $dbh = C4::Context->dbh; -my $csrf_err; if ( $email_add ) { die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ session_id => scalar $query->cookie('CGISESSID'), -- 2.39.5