Bugzilla – Attachment 189211 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 opac-reset-password.tt
Bug-40824-Show-error-for-password-history-clash-in.patch (text/plain), 2.42 KB, created by
Jacob O'Mara
on 2025-11-06 19:34:25 UTC
(
hide
)
Description:
Bug 40824: Show error for password history clash in opac-reset-password.tt
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-11-06 19:34:25 UTC
Size:
2.42 KB
patch
obsolete
>From f95b9555f4ad6167adc8740c5506d810318debe7 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@openfifth.co.uk> >Date: Thu, 10 Apr 2025 12:32:26 +0100 >Subject: [PATCH] Bug 40824: Show error for password history clash in > opac-reset-password.tt > >--- > .../opac-tmpl/bootstrap/en/modules/opac-reset-password.tt | 2 ++ > opac/opac-reset-password.pl | 4 ++++ > 2 files changed, 6 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >index fbadc0fb1c5..7a8e58eb658 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >@@ -45,6 +45,8 @@ > <span>Password must contain at least one digit, one lowercase and one uppercase.</span> > [% CASE 'password_has_whitespaces' %] > <span>Password must not contain leading or trailing whitespaces.</span> >+ [% CASE 'password_used_before' %] >+ <span>This password has been used before. You cannot reuse any of your last [% password_history_count | html %] passwords.</span> > [% CASE 'invalid_credentials' %] > <span > >You entered an incorrect username or password. Please try again! But note that passwords are case >diff --git a/opac/opac-reset-password.pl b/opac/opac-reset-password.pl >index a006682cf69..ae0eab438a9 100755 >--- a/opac/opac-reset-password.pl >+++ b/opac/opac-reset-password.pl >@@ -71,6 +71,10 @@ if ( $op eq 'cud-update' ) { > if $_->isa('Koha::Exceptions::Password::TooWeak'); > $error = 'password_has_whitespaces' > if $_->isa('Koha::Exceptions::Password::WhitespaceCharacters'); >+ if ($_->isa('Koha::Exceptions::Password::UsedBefore')) { >+ $template->param( password_used_before => 1 ); >+ $template->param( password_history_count => C4::Context->preference('PasswordHistoryCount') ); >+ } > $template->param( 'error' => $error ); > }; > } >-- >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
|
189201
|
189202
|
189203
|
189204
|
189205
|
189206
|
189207
|
189208
|
189209
|
189210
| 189211 |
189212
|
189213
|
189214
|
189215
|
189216
|
189217