summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-12-03 10:54:08 +0100
committerGitHub <noreply@github.com>2020-12-03 10:54:08 +0100
commitd7207d838af7ebdc6073ce2cd1df8dc69f7409ac (patch)
tree34728304c3069fc40d03c7cfeec8d8f38b8c8f96
parent0e99d3c1a022492b28823565fbcb24623521ab97 (diff)
parent04d67d558ed279b33c853b959acad9d49e9bc918 (diff)
downloadnextcloud-server-d7207d838af7ebdc6073ce2cd1df8dc69f7409ac.tar.gz
nextcloud-server-d7207d838af7ebdc6073ce2cd1df8dc69f7409ac.zip
Merge pull request #24409 from nextcloud/bugfix/24399
Also run repair steps when encryption is disabled but a legacy key is present
-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);
}