diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 11:51:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 11:51:04 +0300 |
commit | 89d109a4d9a9c471f9dde7d5bd12a60ca91fe1f9 (patch) | |
tree | 76e56e0afc214eb0d9542b22e382c22fd77ae4b9 /apps/encryption | |
parent | 7d5a63ab216347e412dc285667026eb66715cbf9 (diff) | |
parent | 6312c0df6949955d1cd59c3dd444268e0773293c (diff) |
Merge pull request #30508 from nextcloud/fix/psaml-bin
Fix psalm not running
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; |