Bugzilla – Attachment 186517 Details for
Bug 40824
Add option to prevent re-use of passwords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40824: Show error for password history clash in memberpassword.tt
Bug-40824-Show-error-for-password-history-clash-in.patch (text/plain), 2.18 KB, created by
Jacob O'Mara
on 2025-09-17 09:47:42 UTC
(
hide
)
Description:
Bug 40824: Show error for password history clash in memberpassword.tt
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-09-17 09:47:42 UTC
Size:
2.18 KB
patch
obsolete
>From 1bcbe7e38a11d62d7ac22fc87b70aae0e9d8f3e5 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@openfifth.co.uk> >Date: Thu, 10 Apr 2025 12:31:18 +0100 >Subject: [PATCH] Bug 40824: Show error for password history clash in > memberpassword.tt > >--- > .../intranet-tmpl/prog/en/modules/members/member-password.tt | 3 +++ > members/member-password.pl | 4 ++++ > 2 files changed, 7 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >index 83b5a20fbe9..70668ee9146 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >@@ -72,6 +72,9 @@ > [% IF ( ERROR_from_plugin ) %] > <li id="ERROR_from_plugin">The password was rejected by a plugin.</li> > [% END %] >+ [% IF ( ERROR_password_used_before ) %] >+ <li id="ERROR_used_before">This password has been used before. You cannot reuse any of your last [% password_history_count | html %] passwords.</li> >+ [% END %] > [% IF ( NOPERMISSION ) %] > <li>You do not have permission to edit this patron's login information.</li> > [% END %] >diff --git a/members/member-password.pl b/members/member-password.pl >index bb319683b8e..67406b2356b 100755 >--- a/members/member-password.pl >+++ b/members/member-password.pl >@@ -81,6 +81,10 @@ if ( $op eq 'cud-update' && defined($newpassword) and not @errors ) { > push @errors, 'ERROR_password_too_weak'; > } elsif ( $_->isa('Koha::Exceptions::Password::Plugin') ) { > push @errors, 'ERROR_from_plugin'; >+ } elsif ( $_->isa('Koha::Exceptions::Password::UsedBefore') ) { >+ my $count = C4::Context->preference('PasswordHistoryCount') || 0; >+ push @errors, 'ERROR_password_used_before'; >+ $template->param( 'password_history_count' => $count ); > } else { > push( @errors, 'BADUSERID' ); > } >-- >2.39.5
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 40824
:
186511
|
186512
|
186513
|
186514
|
186515
|
186516
| 186517 |
186518
|
186519
|
186520
|
186521
|
186522
|
186523
|
186524
|
186525
|
186526
|
186527