Open atbest opened 1 year ago
In addition, the argon2
algorithm provided by sodium are SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13
and SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13
.
Thus, argon2 encryption can be done with either PHP built-in PASSWORD_ARGON2I
or php-pecl-sodium SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13
algorithm, both of which are dependent on libsodium, and they are equivalent, just with different parameters.
So theoretically you don't need both of them, and requirement of both PHP with --with-password-argon2
and sodium module is unnecessary.
Hi, which Nc version?
25.0.1
This affects me as well.
Nextcloud 25.02 Rocky Linux 9 php 8.0.20
Sodium packages installed:
$ rpm -qa |grep sodium
libsodium-1.0.18-8.el9.x86_64
php-pecl-libsodium2-2.0.23-1.el9.x86_64
Sodium enabled in php:
$ php -m | grep sodium
sodium
Argon2 support enabled through sodium module (only):
$ php -r 'print_r(get_defined_constants());' | grep -i argon
[SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13] => 1
[SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13] => 2
[SODIUM_CRYPTO_PWHASH_STRPREFIX] => $argon2id$
⚠️ This issue respects the following points: ⚠️
Bug description
Following the discussion in https://github.com/nextcloud/server/issues/28398, Nextcloud will still complaint the missing of sodium module when sodium is installed but PHP is not compiled with
--with-password-argon2
. This information is misleading and diverts the users to a wrong direction.Steps to reproduce
--with-password-argon2
.Expected behavior
Nextcloud should tell the users that PHP is not compiled with
--with-password-argon2
, not the missing of sodium module.