]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove workarounds specific to 7.4
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 7 Nov 2022 09:54:02 +0000 (10:54 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Fri, 20 Jan 2023 10:22:08 +0000 (11:22 +0100)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/encryption/lib/Crypto/Crypt.php
apps/settings/lib/Controller/CheckSetupController.php
tests/lib/Files/Type/DetectionTest.php

index 8bfeb0c7a687192fc509960ac5b9d05dde3ad751..efb5a6868b0307d887658fa0760136938624ebef 100644 (file)
@@ -316,8 +316,8 @@ class Crypt {
 
                throw new \InvalidArgumentException(
                        sprintf(
-                                       'Unsupported cipher (%s) defined.',
-                                       $cipher
+                               'Unsupported cipher (%s) defined.',
+                               $cipher
                        )
                );
        }
@@ -470,8 +470,7 @@ class Crypt {
         */
        protected function isValidPrivateKey($plainKey) {
                $res = openssl_get_privatekey($plainKey);
-               // TODO: remove resource check one php7.4 is not longer supported
-               if (is_resource($res) || (is_object($res) && get_class($res) === 'OpenSSLAsymmetricKey')) {
+               if (is_object($res) && get_class($res) === 'OpenSSLAsymmetricKey') {
                        $sslInfo = openssl_pkey_get_details($res);
                        if (isset($sslInfo['key'])) {
                                return true;
index 45e94c3b7a7908d3b481395c4cc46aeae00d56cf..eaaacc3fd220c89973b46343ada39971f7ed5675 100644 (file)
@@ -722,7 +722,7 @@ Raw output
                        $recommendedPHPModules[] = 'sysvsem';
                }
 
-               if (!defined('PASSWORD_ARGON2I') && PHP_VERSION_ID >= 70400) {
+               if (!defined('PASSWORD_ARGON2I')) {
                        // 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
index 568dbb0cf5643c6bfbccec359b2bf0b8f01bfd6c..d2fdb18e26dea1cf624e2e6291956215ee8f34f3 100644 (file)
@@ -71,7 +71,7 @@ class DetectionTest extends \Test\TestCase {
        public function dataDetectContent(): array {
                return [
                        ['/', 'httpd/unix-directory'],
-                       //                      ['/data.tar.gz', 'application/x-gzip'], TODO: fix as it fails hard on php7.4 now
+                       ['/data.tar.gz', 'application/x-gzip'],
                        ['/data.zip', 'application/zip'],
                        ['/testimage.mp3', 'audio/mpeg'],
                        ['/testimage.png', 'image/png'],