]> source.dussan.org Git - nextcloud-server.git/commitdiff
Apply Argon2 options for Argon2id hashing as well 20767/head
authorMichaIng <micha@dietpi.com>
Fri, 1 May 2020 09:42:13 +0000 (11:42 +0200)
committerGitHub <noreply@github.com>
Fri, 1 May 2020 09:42:13 +0000 (11:42 +0200)
Signed-off-by: MichaIng <micha@dietpi.com>
lib/private/Security/Hasher.php

index 2ed21e7e427eda4d6e0ab36124f978dfcb063f8f..a51508ba8e910bd69b6388ca4f489dbbb439b37f 100644 (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);