diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 09:51:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 09:51:04 +0100 |
commit | 89d109a4d9a9c471f9dde7d5bd12a60ca91fe1f9 (patch) | |
tree | 76e56e0afc214eb0d9542b22e382c22fd77ae4b9 /apps | |
parent | 7d5a63ab216347e412dc285667026eb66715cbf9 (diff) | |
parent | 6312c0df6949955d1cd59c3dd444268e0773293c (diff) | |
download | nextcloud-server-89d109a4d9a9c471f9dde7d5bd12a60ca91fe1f9.tar.gz nextcloud-server-89d109a4d9a9c471f9dde7d5bd12a60ca91fe1f9.zip |
Merge pull request #30508 from nextcloud/fix/psaml-bin
Fix psalm not running
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/lib/Crypto/Crypt.php | 4 | ||||
-rw-r--r-- | apps/encryption/lib/KeyManager.php | 2 | ||||
-rw-r--r-- | apps/encryption/lib/Migration/SetMasterKeyStatus.php | 4 | ||||
-rw-r--r-- | apps/encryption/lib/Recovery.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FtpConnection.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/SetupChecks/CheckUserCertificates.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/Access.php | 2 |
7 files changed, 9 insertions, 12 deletions
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 8a6be4d3809..93120068c6a 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -237,7 +237,7 @@ class Crypt { $encryptedContent = openssl_encrypt($plainContent, $cipher, $passPhrase, - false, + 0, $iv); if (!$encryptedContent) { @@ -617,7 +617,7 @@ class Crypt { $plainContent = openssl_decrypt($encryptedContent, $cipher, $passPhrase, - false, + 0, $iv); if ($plainContent) { diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php index 4a2c6c16e2b..ffd07c0f323 100644 --- a/apps/encryption/lib/KeyManager.php +++ b/apps/encryption/lib/KeyManager.php @@ -159,7 +159,7 @@ class KeyManager { $this->config->setAppValue('encryption', 'masterKeyId', $this->masterKeyId); } - $this->keyId = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; + $this->keyId = $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; $this->log = $log; } diff --git a/apps/encryption/lib/Migration/SetMasterKeyStatus.php b/apps/encryption/lib/Migration/SetMasterKeyStatus.php index 9e800ac7cd3..a80d7144cc4 100644 --- a/apps/encryption/lib/Migration/SetMasterKeyStatus.php +++ b/apps/encryption/lib/Migration/SetMasterKeyStatus.php @@ -62,8 +62,8 @@ class SetMasterKeyStatus implements IRepairStep { // if no config for the master key is set we set it explicitly to '0' in // order not to break old installations because the default changed to '1'. - $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false); - if ($configAlreadySet === false) { + $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', 'not-set'); + if ($configAlreadySet === 'not-set') { $this->config->setAppValue('encryption', 'useMasterKey', '0'); } } diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index 22a668cd5b0..f4336ec7c4e 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -76,7 +76,7 @@ class Recovery { IConfig $config, IFile $file, View $view) { - $this->user = ($userSession && $userSession->isLoggedIn()) ? $userSession->getUser() : false; + $this->user = ($userSession->isLoggedIn()) ? $userSession->getUser() : null; $this->crypt = $crypt; $this->keyManager = $keyManager; $this->config = $config; diff --git a/apps/files_external/lib/Lib/Storage/FtpConnection.php b/apps/files_external/lib/Lib/Storage/FtpConnection.php index d87c44656f4..bc4be18e42e 100644 --- a/apps/files_external/lib/Lib/Storage/FtpConnection.php +++ b/apps/files_external/lib/Lib/Storage/FtpConnection.php @@ -27,7 +27,7 @@ namespace OCA\Files_External\Lib\Storage; * Low level wrapper around the ftp functions that smooths over some difference between servers */ class FtpConnection { - /** @var resource */ + /** @var resource|\FTP\Connection */ private $connection; public function __construct(bool $secure, string $hostname, int $port, string $username, string $password) { diff --git a/apps/settings/lib/SetupChecks/CheckUserCertificates.php b/apps/settings/lib/SetupChecks/CheckUserCertificates.php index eff5b4d7515..52fea7b6551 100644 --- a/apps/settings/lib/SetupChecks/CheckUserCertificates.php +++ b/apps/settings/lib/SetupChecks/CheckUserCertificates.php @@ -39,10 +39,7 @@ class CheckUserCertificates { public function __construct(IL10N $l10n, IConfig $config, IURLGenerator $urlGenerator) { $this->l10n = $l10n; - $configValue = $config->getAppValue('files_external', 'user_certificate_scan', false); - if (!is_string($configValue)) { - $configValue = ''; - } + $configValue = $config->getAppValue('files_external', 'user_certificate_scan', ''); $this->configValue = $configValue; $this->urlGenerator = $urlGenerator; } diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index f79efe90996..093449ee0ea 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1753,7 +1753,7 @@ class Access extends LDAPUtility { } $attribute = $this->connection->getFromCache($uuidAttr); - if (!$attribute === null) { + if ($attribute !== null) { $this->connection->$uuidAttr = $attribute; return true; } |