Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Similar to GH-24302 but for Argon2.
ext/password:
password_hash(),password_needs_rehash()no longer accept invalid$options['threads'](above 255)password_verify()no longer calls libargon2 on malformed hashespassword_get_info()no longer parses malformed hashesext/openssl:
[openssl_]password_hash(),[openssl_]password_needs_rehash()no longer accept invalid$options['threads']values (above 255)[openssl_]password_verify()no longer triggers computations and/or throws exceptions on hashes with invalid parameters[openssl_]password_verify()no longer accepts obviously invalid hashes such as with invalid versions or empty salt[openssl_]password_hash(),[openssl_]password_needs_rehash()no longer throw exceptions for invalid options, to match ext/password[openssl_]password_hash(),[openssl_]password_verify()no longer confuse thethreadsoption with OpenSSL's internal threads (this might be why--with-openssl-argon2 --enable-ztsbuilds are currently forbidden, but haven't tested)Also (for both)
password_needs_rehash()will return true if it sees an older version hash, not just changed parameters. And tests, lots of tests. 🙂Most of the work I did in ext/password, and tried to keep ext/openssl changes minimal (
sscanf()usage still broken), but I do intend to fully fix it up once some decisions are made - whether the same parser approach is ok, exactly which conditions should warrant a rehash, etc.libsodium provider is mostly fine - nothing really broken; only a bit rough around the edges with error messages and obscure but valid Argon2 v.1.0 hashes. Will polish it later probably alongside OpenSSL's remaining issues.