Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create account with specific password #4836

Closed
naramski opened this issue Aug 31, 2016 · 2 comments
Closed

Cannot create account with specific password #4836

naramski opened this issue Aug 31, 2016 · 2 comments

Comments

@naramski
Copy link

It's seems it's impossible to create an account with password "test0test" (including double quote) but the password "test0test (no double quote at the end) succeeded.

The validation of the form remind that the password must be length between 4 and 20 in the first case. Accounts creation succeeded in the second case.

@naramski
Copy link
Author

If the password is "testtest" it succeeded also.

@bogdan-manea
Copy link
Contributor

Hi,

It seems that the double quotes characters from your password might get converted to & #39;
as explained here: http://stackoverflow.com/questions/19024821/php-strlen-returning-incorrect-string-length-caused-by-quote therefore giving incorrect length result.
This seems to have already been fixed in the latest catalog/controller/account/register.php file version from GitHub. You need to open the mentioned file and replace this:
if ((utf8_strlen($this->request->post['password']) < 4) || (utf8_strlen($this->request->post['password']) > 20)) {
with this:
if ((utf8_strlen(html_entity_decode($this->request->post['password'], ENT_QUOTES, "UTF-8")) < 4) || (utf8_strlen(html_entity_decode($this->request->post['password'], ENT_QUOTES, "UTF-8")) > 20)) {

@naramski naramski closed this as completed Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants