[11.x] Fix support for other hashing implementations when using hashed
cast
#51112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the function
Hash::isHashed()
added on 10.x (#47197) the functionpassword_get_info()
is hardcoded on theHashManager
instead of using the driver'sinfo()
function (which, in all the 1st party drivers is a call topassword_get_info()
on theAbstractHasher
). This hardcoded method prevents 3rd party drivers to use thehashed
cast, because the call toisHashed
will always returnfalse
when using any algorithm not directly supported bypassword_get_info()
.This was actually commented by @nunomaduro here but the implementation on #47197 only moved the function call to
password_get_info()
to theHashManager
instead of leverage theinfo()
function from the drivers.This PR fixes that.
cc @valorin @gdebrauwer in case you have any opinion regarding this.