]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only recommand for php-sodium on >= PHP 7.4 28655/head
authorCarl Schwan <carl@carlschwan.eu>
Fri, 6 Aug 2021 12:22:09 +0000 (14:22 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 31 Aug 2021 07:11:15 +0000 (07:11 +0000)
This is because php-sodium will solve the missing PASSWORD_ARGON2I
constant problem only on >= php 7.4, previously argon2 wasn't part of
the standard extension and was disabled on Centos/RHEL.

So installing php-sodium on php 7.2 for example wouldn't hide the
message. Tested on Fedora with php 7.4, Centos 7 with php 7.2,
Centos 8 with php 7.2 and openSUSE with php 7.4.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
apps/settings/lib/Controller/CheckSetupController.php

index fc3fde65fe0fb343bd41d190c19cab10650de2dc..1df8dda989756c41638fa97043c3e10cf80669e9 100644 (file)
@@ -621,7 +621,11 @@ Raw output
                        }
                }
 
-               if (!defined('PASSWORD_ARGON2I')) {
+               if (!defined('PASSWORD_ARGON2I') && PHP_VERSION_ID >= 70400) {
+                       // Installing php-sodium on >=php7.4 will provide PASSWORD_ARGON2I
+                       // on previous version argon2 wasn't part of the "standard" extension
+                       // and RedHat disabled it so even installing php-sodium won't provide argon2i
+                       // support in password_hash/password_verify.
                        $recommendedPHPModules[] = 'sodium';
                }