From a2e52a4d24eeca841a34fc5b5d3a3a0cdd8ff92e 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 --- 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 eb80aebddf3..052a08629a2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt @@ -87,6 +87,7 @@
+ Cancel
diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl index 6ae82f0a8ea..23ff92ab7ee 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.25.1