-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Security::checkHash returns true when using with a non-bcrypt hash #1912
Comments
We're not implementing our own bcrypt, we're using php's bcrypt: https://github.com/phalcon/cphalcon/blob/master/ext/security.c#L281 |
I saw that, nevertheless the output is different. I guess something goes wrong in this if security.c#L291?
|
Am I guessing or do we compare string lengths here:
But if they are not equal in length first place then this:
Will always be true. Hence the result. |
Fixed in 1.2.6 and 1.3.0 |
In 1.2.6, When checkHash first param is empty, it's always true... |
…
That's so not true… 😰 Though, when using actual incorrect bcrypt hashes it works fine.
The text was updated successfully, but these errors were encountered: