From 14d95cb2e37a0144e97f506b302646256a1fc7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 27 Nov 2020 10:01:34 +0100 Subject: [PATCH] Also handle legacy cipher support when encryption is disabled but an old master key is present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Repair/NC20/EncryptionLegacyCipher.php | 3 ++- lib/private/Repair/NC20/EncryptionMigration.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Repair/NC20/EncryptionLegacyCipher.php b/lib/private/Repair/NC20/EncryptionLegacyCipher.php index 0be34679fc..f887feefc9 100644 --- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php +++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php @@ -58,7 +58,8 @@ class EncryptionLegacyCipher implements IRepairStep { return; } - if ($this->manager->isEnabled()) { + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); + if ($this->manager->isEnabled() || !empty($masterKeyId)) { if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { $this->config->setSystemValue('encryption.legacy_format_support', true); } diff --git a/lib/private/Repair/NC20/EncryptionMigration.php b/lib/private/Repair/NC20/EncryptionMigration.php index 1eba09f413..d5879073d5 100644 --- a/lib/private/Repair/NC20/EncryptionMigration.php +++ b/lib/private/Repair/NC20/EncryptionMigration.php @@ -58,7 +58,8 @@ class EncryptionMigration implements IRepairStep { return; } - if ($this->manager->isEnabled()) { + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); + if ($this->manager->isEnabled() || !empty($masterKeyId)) { if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') { $this->config->setSystemValue('encryption.key_storage_migrated', false); }