Merge pull request #20767 from nextcloud/enh/argon2id-options

Apply Argon2 options for Argon2id hashing as well
This commit is contained in:
Roeland Jago Douma 2020-05-01 15:39:13 +02:00 committed by GitHub
commit 8c023a6579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class Hasher implements IHasher {
public function __construct(IConfig $config) {
$this->config = $config;
if (\defined('PASSWORD_ARGON2I')) {
if (\defined('PASSWORD_ARGON2ID') || \defined('PASSWORD_ARGON2I')) {
// password_hash fails, when the minimum values are undershot.
// In this case, apply minimum.
$this->options['threads'] = max($this->config->getSystemValueInt('hashingThreads', PASSWORD_ARGON2_DEFAULT_THREADS), 1);