dmsman2 Posted March 8, 2009 Share Posted March 8, 2009 Hi,i used the search function but for my question i didn't find an answer...I found out it's not possible to use special characters for passwords (accounts). I tried to use the @ within my password then i received the message "password is invalid"How can i change this or what can be done?Thanks a lotrgdsdmsman2 Link to comment Share on other sites More sharing options...
dmsman2 Posted March 13, 2009 Author Share Posted March 13, 2009 No idea how to fix this ?Thx Link to comment Share on other sites More sharing options...
Tommix Posted May 8, 2009 Share Posted May 8, 2009 open file validate.php in classes dir, search for isPasswd function, there is what simbols can be it set to 0-9 and a-z you can change it but i don't know how it efect regeneration and so on i on presta few days only. Link to comment Share on other sites More sharing options...
dmsman2 Posted May 9, 2009 Author Share Posted May 9, 2009 Hi Tommix,thanks for your hint!The good thing is, we now know which lines we may have to change to allow special characters :-) validate.php -> /** * Check for password validity * * @param string $passwd Password to validate * @return boolean Validity is ok or not */ static public function isPasswd($passwd, $size = 5) { return preg_match('/^[.a-z_0-9-]{'.$size.',32}$/ui', $passwd); } static public function isPasswdAdmin($passwd) { return self::isPasswd($passwd, 8); } /** * Check for configuration key validity * * @param string $configName Configuration key to validate * @return boolean Validity is ok or not */ static public function isConfigName($configName) { return preg_match('/^[a-z_0-9-]+$/ui', $configName); } The bad thing is, i'm a beginner too, no idea how to change this regular expressions.My problem is, i have a few customers know, which complaining about the password security! They asking me, why can't we use some characters like "#", "+", "?", "$" or for example the "!"....A question to the coders out there :-) How do we have to change/add the code above to allow some more special characters ? And are there any other changes in other files needed ?Thanks a lot ! Link to comment Share on other sites More sharing options...
Tommix Posted May 9, 2009 Share Posted May 9, 2009 do you tried just to add those chars to preg_mach ?like: return preg_match('/^[@#!$?.a-z_0-9-]{'.$size.',32}$/ui', $passwd); try it Link to comment Share on other sites More sharing options...
Maine Notary Net Posted May 27, 2010 Share Posted May 27, 2010 No luck for me there -- I have both a + and a } in one of my passwords but the error: smtp: passowrd is invalid and I had tried to incorporate the { } and + into the prg_match expression.any way to do this? I do NOT want to be FORCED to change a password because passwords should be secure as a person has them and this doesn't allow these charachters.need help please Link to comment Share on other sites More sharing options...
rocky Posted May 27, 2010 Share Posted May 27, 2010 In PrestaShop v1.3, more possible symbols have been added to the password. Line 424 of classes/Validate.php is now the following, which allows !@#$%\^&*() to be used: return preg_match('/^[.a-z_0-9-!@#$%\^&*()]{'.$size.',32}$/ui', $passwd); Is this enough, or do you really need {}+ as well? Link to comment Share on other sites More sharing options...
Shaun Posted September 11, 2010 Share Posted September 11, 2010 Rocky, do you know how I can get rid off the "special characters allowed" pop-up? This is driving me crazy every time I go to enter text into one of these fields, i have to click again to actually enter anything. This box also is obscuring information in the text field below. Really dumb feature if you ask me... Link to comment Share on other sites More sharing options...
rocky Posted September 12, 2010 Share Posted September 12, 2010 Go to the Preferences tab and change "Back Office help boxes" to "No". Link to comment Share on other sites More sharing options...
Shaun Posted September 12, 2010 Share Posted September 12, 2010 Awesome, thank you!!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now