From 3c832b0375eca1111670dbe0885dcec89a16e8e9 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Fri, 18 Dec 2009 09:09:02 -0500 Subject: [PATCH] Bug 2662: make rand password consider minPasswordLength pref --- members/member-password.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/member-password.pl b/members/member-password.pl index 071a5fa598..67f96db933 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -73,7 +73,7 @@ if ( $newpassword && ! $errormsg ) { my $userid = $bor->{'userid'}; my $chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - my $length=int(rand(2))+4; + my $length=int(rand(2))+C4::Context->preference("minPasswordLength"); my $defaultnewpassword=''; for (my $i=0; $i<$length; $i++) { $defaultnewpassword.=substr($chars, int(rand(length($chars))),1); -- 2.39.5