Bugzilla – Attachment 78414 Details for
Bug 21314
Koha enforces three (3) character password length even if RequireStrongPassword is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21314: Koha enforces three (3) character password length even if RequireStrongPassword is disabled
Bug-21314-Koha-enforces-three-3-character-password.patch (text/plain), 1.86 KB, created by
Kyle M Hall (khall)
on 2018-09-04 17:16:44 UTC
(
hide
)
Description:
Bug 21314: Koha enforces three (3) character password length even if RequireStrongPassword is disabled
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-09-04 17:16:44 UTC
Size:
1.86 KB
patch
obsolete
>From 0f4de0d18da603fa52c2928b767839094dc681bb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutiosn.com> >Date: Tue, 4 Sep 2018 11:32:31 -0400 >Subject: [PATCH] Bug 21314: Koha enforces three (3) character password length > even if RequireStrongPassword is disabled > >Bug 18298 added the option to enforce password complexity *if* the new system preference RequireStrongPassword >is enabled. However, it appears that the code defining the minimum number of characters was not put under control >of this preference and thus Koha enforces a minimum password length of 3 even if RequireStrongPassword is disabled. > >Test Plan: >1) Set minPasswordLength to 2 >2) Disable RequireStrongPassword >3) Attempt to change a password to a two character password >4) Note Koha tells you the minimum length is 3 characters >5) Apply this patch >6) Restart memached/plack, Reload the page >7) You should now be able to set the password to a 2 character string >--- > C4/Auth.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 70d41c7854..6c2ada6e18 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -416,8 +416,11 @@ sub get_template_and_user { > my $https = $in->{query}->https(); > my $using_https = ( defined $https and $https ne 'OFF' ) ? 1 : 0; > >- my $minPasswordLength = C4::Context->preference('minPasswordLength'); >- $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3; >+ my $minPasswordLength = C4::Context->preference('minPasswordLength') || 0; >+ if ( C4::Context->preference('RequireStrongPassword') ) { >+ $minPasswordLength = 3 if $minPasswordLength < 3; >+ } >+ > $template->param( > "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, > EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), >-- >2.11.0
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 21314
: 78414 |
78427
|
78432
|
78433