diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-03-17 10:33:18 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-03-17 11:08:59 +0100 |
commit | 24e762c59f2875098359db0fb23eb5a3ebe40d18 (patch) | |
tree | ac9bdd5ddd985b96a3418d7aedc5b7d557805113 /apps | |
parent | 0750481bb72344dd5576866da119fadecf5f62d8 (diff) | |
download | nextcloud-server-24e762c59f2875098359db0fb23eb5a3ebe40d18.tar.gz nextcloud-server-24e762c59f2875098359db0fb23eb5a3ebe40d18.zip |
Fix encryption file key management
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/lib/Crypto/Encryption.php | 2 | ||||
-rw-r--r-- | apps/encryption/lib/KeyManager.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 838c63e9495..465856fd28d 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -516,7 +516,7 @@ class Encryption implements IEncryptionModule { * @throws DecryptionFailedException */ public function isReadable($path, $uid) { - $fileKey = $this->keyManager->getFileKey($path, $uid); + $fileKey = $this->keyManager->getFileKey($path, $uid, null); if (empty($fileKey)) { $owner = $this->util->getOwner($path); if ($owner !== $uid) { diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php index 5c933b5f8b2..f0005b45761 100644 --- a/apps/encryption/lib/KeyManager.php +++ b/apps/encryption/lib/KeyManager.php @@ -485,7 +485,7 @@ class KeyManager { $privateKey); } } - if ($useLegacyFileKey ?? false) { + if (!($useLegacyFileKey ?? false)) { if ($shareKey && $privateKey) { return $this->crypt->multiKeyDecrypt($shareKey, $privateKey); } |