coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: calvinite on October 16, 2008, 08:05:19 PM

Title: [Solved]: Default password character length
Post by: calvinite on October 16, 2008, 08:05:19 PM
Hello, I hope I'm in the correct place to post this. If not I apologize and request you move it to the appropriate board. I've read and searched the documentation and the forum, and though I might be overlooking it I can't find anything on changing the required character length for the login password. For extra security, I'd like to change it from the default length of two characters, of which I found a reference to listed in the $lang_register_php = array section of english.php, in the array element 'err_password_short' =>. I can't find it anywhere else and would appreciate help in this matter. And just so you know, I know just enough about php to get into trouble.

I'd also like to complement all you support and programmers on a fine job with CPG. This is my first use of it and I found the documentation to be fairly understandable, for someone completely in the dark and only resorted to posting when I ran out of steam. I've been looking, off and on, for several days. Thanks.
Title: Re: Default password character length
Post by: Nibbler on October 16, 2008, 08:28:45 PM
Just search in register.php for 'err_password_short' and you'll find it.
Title: Re: Default password character length
Post by: calvinite on October 16, 2008, 09:14:59 PM
I found that but I need to know where to change the default length to 8 characters instead of 2, not just change the wording. I want to make it mandatory that passwords be 8 characters or more long. Thank you.
Title: Re: Default password character length
Post by: calvinite on October 16, 2008, 09:20:09 PM
Doh! Sorry about that. I overlooked where you said, "register.php". I want to be sure I understand though. Are you saying to change:
Quoteif (utf_strlen($password) < 2) $error .= '<li>' . $lang_register_php['err_password_short'];

and change it to:
Quoteif (utf_strlen($password) < 8;) $error .= '<li>' . $lang_register_php['err_password_short'];

to change the default 2 to 8?

Thanks again.
Title: Re: Default password character length
Post by: Joachim Müller on October 16, 2008, 09:21:26 PM
Correct
Title: Re: Default password character length
Post by: calvinite on October 16, 2008, 09:27:34 PM
Great. Thank you very much, I truly appreciate it.