summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php4
-rw-r--r--apps/encryption/lib/KeyManager.php2
-rw-r--r--apps/encryption/lib/Migration/SetMasterKeyStatus.php4
-rw-r--r--apps/encryption/lib/Recovery.php2
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;