]> source.dussan.org Git - nextcloud-server.git/commit
Fix Argon2 options checks 20710/head
authorMichaIng <micha@dietpi.com>
Tue, 28 Apr 2020 19:04:34 +0000 (21:04 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 30 Apr 2020 08:18:46 +0000 (10:18 +0200)
commitad606196554dadea49e5ddfa44fb54b89ba24d3e
tree8069559c81a3d7b7236485faa512c04318d9a37e
parenta1c1b354fcb79153a78a658b758acd514089c9e1
Fix Argon2 options checks

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 <micha@dietpi.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Security/Hasher.php
tests/lib/Security/HasherTest.php