Password not allowing numbers

12 years 6 months ago #52129 by tinfoil
Password not allowing numbers was created by tinfoil
Good day,

Running CB 1.1 on Joomla 1.5SVN12/07/2007. If a user uses a password with numbers in it, it gives the error:

Please enter a valid Password: No spaces, more than 6 charcters, and contain 0-9,a-z,A-Z.

Quite strange indeed.

Please Log in to join the conversation.

12 years 6 months ago #52131 by beat
Replied by beat on topic Re:Password not allowing numbers
CB uses the same algorithm as the latest known CMS release on which it runs. This is a joomla 1.5 pre-RC3 behavior.

Maybe something changed in between in Joomla 1.5 ?

We will check again at next RC4 of joomla 1.5, if it's a little bit more stable ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

12 years 6 months ago #52134 by tinfoil
Replied by tinfoil on topic Re:Password not allowing numbers
I believe I have fixed this. I modified three lines in comprofiler.html.php, #170, #1114 and #1213. Originally:

[code:1] var r = new RegExp("^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i"«»);[/code:1]

Now:
[code:1] var r = new RegExp("^[a-zA-Z0-9](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i"«»);[/code:1]

I don't know which line is the magic bullet, but from the looks of it #1213 is for forgotten username. This may likely be an ugly hack, but it seems to work for me in very limited testing. The user is created with the password that previously caused problems. The user is able to login properly as well.

I didn't state this previously, but this was also present in the 1.5 RC3 download from the joomla main page.

Please Log in to join the conversation.

12 years 4 months ago #57685 by vickyh
Replied by vickyh on topic Re:Password not allowing numbers
Thank you for posting this. It has solved my problem.

Incidentally I also had to make the same change to the reg expression in admin.comprofiler.html.php on line #1760 so that it worked in the backend.

Please Log in to join the conversation.

12 years 2 months ago #60797 by skeptikal
Replied by skeptikal on topic Re:Password not allowing numbers
Tinfoil you da man! That solved mi problema with the registration process...now I can create users with numbers in the pass first!!!!....cool find/hack.

thanks man

- Skep

Please Log in to join the conversation.

12 years 2 months ago #60809 by beat
Replied by beat on topic Re:Password not allowing numbers
This is now fixed too in upcoming CB 1.2 :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.432 seconds

Facebook Twitter LinkedIn