Bugzilla – Attachment 186519 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-passwd.tt
Bug-40824-Show-error-for-password-history-clash-in.patch (text/plain), 2.22 KB, created by
Jacob O'Mara
on 2025-09-17 09:47:46 UTC
(
hide
)
Description:
Bug 40824: Show error for password history clash in opac-passwd.tt
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-09-17 09:47:46 UTC
Size:
2.22 KB
patch
obsolete
>From fd8db7607aa44e2a31356b229765a8cf28af768f Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@openfifth.co.uk> >Date: Thu, 10 Apr 2025 12:32:02 +0100 >Subject: [PATCH] Bug 40824: Show error for password history clash in > opac-passwd.tt > >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt | 4 ++++ > opac/opac-passwd.pl | 4 ++++ > 2 files changed, 8 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 95ce30e4562..e8073a82743 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >@@ -57,6 +57,10 @@ > [% IF password_has_whitespaces %] > <span>Password must not contain leading or trailing whitespaces.</span> > [% END %] >+ >+ [% IF password_used_before %] >+ <span>This password has been used before. You cannot reuse any of your last [% password_history_count | html %] passwords.</span> >+ [% END %] > > [% IF ( WrongPass ) %] > <span>Your current password was entered incorrectly. If this problem persists, please ask a librarian to reset your password for you.</span> >diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl >index 820a2b80d40..0b45a39d7b1 100755 >--- a/opac/opac-passwd.pl >+++ b/opac/opac-passwd.pl >@@ -68,6 +68,10 @@ if ( $patron->category->effective_change_password ) { > if $_->isa('Koha::Exceptions::Password::TooWeak'); > $error = 'password_has_whitespaces' > if $_->isa('Koha::Exceptions::Password::WhitespaceCharacters'); >+ if ($_->isa('Koha::Exceptions::Password::UsedBefore')) { >+ $error = 'password_used_before'; >+ $template->param( 'password_history_count' => C4::Context->preference('PasswordHistoryCount') ); >+ } > }; > } > } else { >-- >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