-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix Argon2 options checks #20710
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
Fix Argon2 options checks #20710
Conversation
I think so. Probably something like that. As long as we use the |
|
@kesselb |
I'm not sure but |
|
@kesselb EDIT:
Okay so all this is pretty failsafe. |
c908fd7 to
6123e68
Compare
|
@kesselb |
That makes it impossible to pick a lower value than PASSWORD_ARGON2_DEFAULT_* 🤔 |
That should cover most cases. Lets keep it simple ;) |
Ah damn you're right. Also: https://www.php.net/manual/en/password.constants.php
So no chance those are not set or invalid. |
6123e68 to
dd17608
Compare
rullzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
|
CI says no... |
The minimum for memory cost is 8 KiB per thread. Threads must be checked and set first to allow checking against the correct memory cost mimimum. Options are now applied the following way: - If config.php contains the setting with an integer higher or equal to the minimum, it is applied. - If config.php contains the setting with an integer lower than the minimum, the minimum is applied. - If config.php does not contain the setting or with no integer value, the PHP default is applied. Signed-off-by: MichaIng <[email protected]> Signed-off-by: Roeland Jago Douma <[email protected]>
dd17608 to
ad60619
Compare
|
Fixed the tests |
|
/backport to stable18 |
|
/backport to stable17 |
|
/backport to stable16 |
As of: #19023 (comment)
The minimum for memory cost is 8 KiB per thread. Threads must be checked and set first to allow checking against the correct memory cost mimimum.
Options are now applied the following way: