From 229570badfa9cef0b395e3fd55a251ff39d0ed12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 1 May 2020 11:42:13 +0200 Subject: [PATCH] Apply Argon2 options for Argon2id hashing as well Signed-off-by: MichaIng --- lib/private/Security/Hasher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php index 2ed21e7e42..a51508ba8e 100644 --- a/lib/private/Security/Hasher.php +++ b/lib/private/Security/Hasher.php @@ -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);