Bugzilla – Attachment 155981 Details for
Bug 34478
Full CSRF protection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34478: Add 'op' to opac-passwd
Bug-34478-Add-op-to-opac-passwd.patch (text/plain), 1.86 KB, created by
Jonathan Druart
on 2023-09-21 10:05:12 UTC
(
hide
)
Description:
Bug 34478: Add 'op' to opac-passwd
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-09-21 10:05:12 UTC
Size:
1.86 KB
patch
obsolete
>From ab5716101f2616e611b61b4971ec04df060a492d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 @@ > </div> > </fieldset> > <fieldset class="action"> >+ <input type="hidden" name="op" value="change_password" /> > <input type="submit" value="Change password" class="btn btn-primary" /> > <a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a> > </fieldset> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34478
:
154241
|
154242
|
154243
|
154244
|
154245
|
154246
|
154247
|
154248
|
154249
|
154250
|
154251
|
154252
|
154253
|
154254
|
155971
|
155972
|
155973
|
155974
|
155975
|
155976
|
155977
|
155978
|
155979
|
155980
|
155981
|
155982
|
155983
|
155984
|
155985
|
155986
|
155987
|
155988
|
155989
|
155990
|
156070
|
156071
|
156072
|
156073
|
156074
|
162114
|
162165
|
162630