diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-06 18:57:32 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-12 22:03:06 +0300 |
commit | aeecb72e96e54439f98822467bb727366207039f (patch) | |
tree | b77aee20add8d099a271131e0b4b0986426e5df1 /apps/encryption | |
parent | 47c9c34cca22602fb609de6c0e1d32ec17a9e7fe (diff) |
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/encryption')
-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 |
4 files changed, 6 insertions, 6 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; |