summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-05-04 17:50:51 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-05-04 17:50:51 +0200
commitc9c49bfef8ff39eb052d9bddb796882290467c98 (patch)
treebca1bcaa0b78f29f1efb5067a81f05da2e48acf3 /apps
parent146284f170d3da88709ec76007f6f7b5ad975d39 (diff)
downloadnextcloud-server-c9c49bfef8ff39eb052d9bddb796882290467c98.tar.gz
nextcloud-server-c9c49bfef8ff39eb052d9bddb796882290467c98.zip
Log failures to delete legacy file key
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/lib/Crypto/Encryption.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php
index 465856fd28d..0bcaa167907 100644
--- a/apps/encryption/lib/Crypto/Encryption.php
+++ b/apps/encryption/lib/Crypto/Encryption.php
@@ -309,7 +309,12 @@ class Encryption implements IEncryptionModule {
$publicKeys = $this->keyManager->addSystemKeys($this->accessList, $publicKeys, $this->getOwner($path));
$shareKeys = $this->crypt->multiKeyEncrypt($this->fileKey, $publicKeys);
- $this->keyManager->deleteLegacyFileKey($this->path);
+ if (!$this->keyManager->deleteLegacyFileKey($this->path)) {
+ $this->logger->warning(
+ 'Failed to delete legacy filekey for {path}',
+ ['app' => 'encryption', 'path' => $path]
+ );
+ }
foreach ($shareKeys as $uid => $keyFile) {
$this->keyManager->setShareKey($this->path, $uid, $keyFile);
}