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

[11.x] Fix support for other hashing implementations when using hashed cast #51112

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

j3j5
Copy link
Contributor

@j3j5 j3j5 commented Apr 18, 2024

On the function Hash::isHashed() added on 10.x (#47197) the function password_get_info() is hardcoded on the HashManager instead of using the driver's info() function (which, in all the 1st party drivers is a call to password_get_info() on the AbstractHasher). This hardcoded method prevents 3rd party drivers to use the hashed cast, because the call to isHashed will always return false when using any algorithm not directly supported by password_get_info().

This was actually commented by @nunomaduro here but the implementation on #47197 only moved the function call to password_get_info() to the HashManager instead of leverage the info() function from the drivers.

This PR fixes that.

cc @valorin @gdebrauwer in case you have any opinion regarding this.

@gdebrauwer
Copy link
Contributor

I think this change is ok, as the info() method in the AbstractHasher still uses the password_get_info() method 👍

@taylorotwell taylorotwell merged commit 2ebd685 into laravel:11.x Apr 18, 2024
30 checks passed
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

Successfully merging this pull request may close these issues.

3 participants