Bugzilla – Attachment 78433 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: Fix duplicate code in Koha::AuthUtils::is_password_valid
Bug-21314-Fix-duplicate-code-in-KohaAuthUtilsispas.patch (text/plain), 1.07 KB, created by
Kyle M Hall (khall)
on 2018-09-05 10:50:23 UTC
(
hide
)
Description:
Bug 21314: Fix duplicate code in Koha::AuthUtils::is_password_valid
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-09-05 10:50:23 UTC
Size:
1.07 KB
patch
obsolete
>From 40da71fd8103316ae944b8eec0a3b79dd8110c60 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutiosn.com> >Date: Wed, 5 Sep 2018 06:46:18 -0400 >Subject: [PATCH] Bug 21314: Fix duplicate code in > Koha::AuthUtils::is_password_valid > >--- > Koha/AuthUtils.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/AuthUtils.pm b/Koha/AuthUtils.pm >index a42705fd9b..3ab39907f1 100644 >--- a/Koha/AuthUtils.pm >+++ b/Koha/AuthUtils.pm >@@ -148,8 +148,12 @@ otherwise return $is_valid == 0 and $error will contain the error ('too_short' o > > sub is_password_valid { > my ($password) = @_; >- 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; >+ } >+ > if ( length($password) < $minPasswordLength ) { > return ( 0, 'too_short' ); > } >-- >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