How to increase password lenght

Discussion regarding Joomla! security issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
bergmannn
Joomla! Ace
Joomla! Ace
Posts: 1186
Joined: Tue Jan 10, 2006 2:18 pm
Location: Málaga - Spain

How to increase password lenght

Post by bergmannn » Fri Jan 20, 2006 9:26 am

Hello everybody,

For the italian privacy law i have to increase the password lenght in the member area to minimum 8 digits.
In the latest version i see the warning that you need 6 digits.

How or where can i increase this option to 8 digits?

I think this topic is very important for all italian companies that uses joomla with registered users!

Regards

Martin Bergmann
Martin Bergmann

davidrrm
Joomla! Explorer
Joomla! Explorer
Posts: 251
Joined: Mon Sep 05, 2005 3:50 pm

Re: How to increase password lenght

Post by davidrrm » Fri Jan 20, 2006 11:13 am

I haven't tried this myself, but you'd want to change the following places in the code
in components/com_registration/registration.html.php. The line -

Code: Select all

} else if (form.password.value.length < 6) {
should have the 6 changed to an 8.

in the language file (using english.php as the sample here since that's what I have on my system)

Code: Select all

DEFINE('_REGWARN_PASS','Please enter a valid password.  No spaces, more than 6 characters and contain 0-9,a-z,A-Z');
You'll want to change the 6 to a 7 (I believe the text is wrong and "more" should read "at least").

That only works for registering. It appears that Joomla! doesn't make a similar check on length when users change their password.

For that you would want to add a check to the JavaScript code in the editUser function found in administrator/components/com_users/admin.users.html.php
and the userEdit function in components/com_user/user.html.php.

User avatar
bergmannn
Joomla! Ace
Joomla! Ace
Posts: 1186
Joined: Tue Jan 10, 2006 2:18 pm
Location: Málaga - Spain

Re: How to increase password lenght

Post by bergmannn » Fri Jan 20, 2006 1:38 pm

Works Great ! 8)

Many Thanks

regards

Martin
Martin Bergmann

uzairasuknow
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Apr 19, 2013 12:20 pm

Re: How to increase password lenght

Post by uzairasuknow » Fri Apr 19, 2013 3:27 pm

davidrrm wrote:I haven't tried this myself, but you'd want to change the following places in the code
in components/com_registration/registration.html.php. The line -

Code: Select all

} else if (form.password.value.length < 6) {
should have the 6 changed to an 8.

in the language file (using english.php as the sample here since that's what I have on my system)

Code: Select all

DEFINE('_REGWARN_PASS','Please enter a valid password.  No spaces, more than 6 characters and contain 0-9,a-z,A-Z');
You'll want to change the 6 to a 7 (I believe the text is wrong and "more" should read "at least").

That only works for registering. It appears that Joomla! doesn't make a similar check on length when users change their password.

For that you would want to add a check to the JavaScript code in the editUser function found in administrator/components/com_users/admin.users.html.php
and the userEdit function in components/com_user/user.html.php.
Thanks David, that really worked even after 7 years ago posted. However some Page links has been changed. Here anyone can find the updated answer http://stackoverflow.com/questions/1606 ... 3#16107903. Thanks again David!

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: How to increase password lenght

Post by mandville » Fri Apr 19, 2013 5:21 pm

uzairasuknow wrote: Thanks David, that really worked even after 7 years ago posted. However some Page links has been changed.
you are posting in a joomla 1.0 forum and link to a j2.5 subject post.
totally irrelevant and off topic.
I will remove your link and lock this topic after giving a chance for you to respond
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}


Locked

Return to “Security - 1.0.x”