Merge pull request #28332 from nextcloud/work/carl/argon2i2

Only recommand for php-sodium on >= PHP 7.4
This commit is contained in:
Christoph Wurst 2021-08-31 08:59:27 +02:00 committed by GitHub
commit 506b411dfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -627,7 +627,11 @@ Raw output
}
}
if (!defined('PASSWORD_ARGON2I')) {
if (!defined('PASSWORD_ARGON2I') && PHP_VERSION_ID >= 70400) {
// Installing php-sodium on >=php7.4 will provide PASSWORD_ARGON2I
// on previous version argon2 wasn't part of the "standard" extension
// and RedHat disabled it so even installing php-sodium won't provide argon2i
// support in password_hash/password_verify.
$recommendedPHPModules[] = 'sodium';
}