Remove workarounds specific to 7.4

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/34997/head
Côme Chilliet 2 years ago
parent 9369b67df3
commit 7ebbb6b2ca
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A

@ -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;

@ -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

@ -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'],

Loading…
Cancel
Save