diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-27 10:01:34 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-12-03 09:56:59 +0000 |
commit | 14d95cb2e37a0144e97f506b302646256a1fc7ac (patch) | |
tree | 36a8aaff956b69ffb9da7c3d85f7768886c9acbb /lib/private | |
parent | f6c24133a4fc9814c4a9a58ddd7a2f97b6254b42 (diff) | |
download | nextcloud-server-14d95cb2e37a0144e97f506b302646256a1fc7ac.tar.gz nextcloud-server-14d95cb2e37a0144e97f506b302646256a1fc7ac.zip |
Also handle legacy cipher support when encryption is disabled but an old master key is present
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Repair/NC20/EncryptionLegacyCipher.php | 3 | ||||
-rw-r--r-- | 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 0be34679fcb..f887feefc98 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 1eba09f413a..d5879073d59 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); } |