From 4ed5bf19a7f3404b8aada8d61092862d9ed3d3a2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 4 Aug 2023 11:13:14 +0200 Subject: [PATCH] Bug 34478: Add 'op' to opac-passwd Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt | 1 + opac/opac-passwd.pl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt index 019483191b..d5692d19f5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt @@ -91,6 +91,7 @@
+ Cancel
diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl index 6ae82f0a8e..23ff92ab7e 100755 --- a/opac/opac-passwd.pl +++ b/opac/opac-passwd.pl @@ -30,6 +30,7 @@ use Koha::Patrons; use Try::Tiny qw( catch try ); my $query = CGI->new; +my $op = $query->param('op') || q{}; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -45,6 +46,7 @@ if ( $patron->category->effective_change_password ) { && $query->param('Newkey') && $query->param('Confirm') ) { + die "op must be set" unless $op eq 'change_password'; my $error; my $new_password = $query->param('Newkey'); my $confirm_password = $query->param('Confirm'); -- 2.39.5