aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-11-27 10:01:34 +0100
committerJulius Härtl <jus@bitgrid.net>2020-12-03 09:47:05 +0100
commit04d67d558ed279b33c853b959acad9d49e9bc918 (patch)
treed743818e3c8cdefdfb510dea69552cbd386dec0e /lib/private/Repair
parent4d64ec9944e4bf7f04ca3ad60ca37164c9e10220 (diff)
downloadnextcloud-server-04d67d558ed279b33c853b959acad9d49e9bc918.tar.gz
nextcloud-server-04d67d558ed279b33c853b959acad9d49e9bc918.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/Repair')
-rw-r--r--lib/private/Repair/NC20/EncryptionLegacyCipher.php3
-rw-r--r--lib/private/Repair/NC20/EncryptionMigration.php3
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);
}