obey-robots.txt
View Thread
Wrong translation, better translation, help with translation.
 Print Thread
[Fix] password contains invalid characters!
Fusioneer
Several times I have been contacted by people with trouble entering a valid password upon registration.
They would get an error like this: "Password is too short or contains invalid characters!"

I carefully looked at the corresponding function in PasswordAuth.class.php:
Download source  GeSHi: PHP
  1. // Checks if new password input is valid
  2. private function _isValidPasswordInput() {
  3. if (preg_match("/^[0-9A-Z@!#$%&\/\(\)=\-_?+\*\.,:;]{8,64}$/i", $this->inputNewPassword)) {
  4. return true;
  5. } else {
  6. return false;
  7. }
  8. }
  9.  
Parsed in 0.042 seconds, using GeSHi 1.0.8.10

But could not find anything wrong.

Then I looked at the translation in the locale files and here is the culprit. The \ (backslash) is presented as a valid character in a password, but it is NOT.
In user_fields.php change:
Download source  GeSHi: PHP
  1. $locale['u147'] = "Password must be between 8 and 64 chars long.Allowed symbols are a-z, 0-9 and @!#$%&\/()=-_?+*.,:;";
Parsed in 0.015 seconds, using GeSHi 1.0.8.10

to (note the misplaced \ (backslash) here)
Download source  GeSHi: PHP
  1. $locale['u147'] = "Password must be between 8 and 64 chars long.Allowed symbols are a-z, 0-9 and @!#$%&/()=-_?+*.,:;";
Parsed in 0.015 seconds, using GeSHi 1.0.8.10


The \ (backslash) is used to escape some special characters in a preg_match function. Apparently this is a typo in the locale file and need to be fixed in order to ensure smooth registration of new users. Now they get frustrated and leave your site.
Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
 
Jump to Forum
New Thread Post Reply
Use BBcode or HTML to refer to; '[Fix] password contains invalid characters!'
BBcode:
HTML:
Simular threads
Subject Discussion Forum         Last Post
Fixing special characters in sendmail_include.php Modifications to sendmail_include.php : 3 12-11-2014