summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-11-20 14:15:45 +0100
committerGitHub <noreply@github.com>2020-11-20 14:15:45 +0100
commit7fd7601016ca08cfcb5ad7281310d9272de61509 (patch)
tree18405d57f67d9b33f40da384e8592c74f21c3842
parent0d30047ac683ffb29c6c593621740c9ce95dcbdf (diff)
parentb71803802ca7684484ce97f0e07c8da37445b1b8 (diff)
downloadnextcloud-server-7fd7601016ca08cfcb5ad7281310d9272de61509.tar.gz
nextcloud-server-7fd7601016ca08cfcb5ad7281310d9272de61509.zip
Merge pull request #24241 from nextcloud/enh/harden_EncryptionLegacyCipher_repair
Harden EncryptionLegacyCipher a bit
-rw-r--r--lib/private/Repair/NC20/EncryptionLegacyCipher.php4
-rw-r--r--lib/private/Repair/NC20/EncryptionMigration.php4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Repair/NC20/EncryptionLegacyCipher.php b/lib/private/Repair/NC20/EncryptionLegacyCipher.php
index 7418a66ec5d..0be34679fcb 100644
--- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php
+++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php
@@ -54,6 +54,10 @@ class EncryptionLegacyCipher implements IRepairStep {
}
public function run(IOutput $output): void {
+ if (!$this->shouldRun()) {
+ return;
+ }
+
if ($this->manager->isEnabled()) {
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 41681a314ac..1eba09f413a 100644
--- a/lib/private/Repair/NC20/EncryptionMigration.php
+++ b/lib/private/Repair/NC20/EncryptionMigration.php
@@ -54,6 +54,10 @@ class EncryptionMigration implements IRepairStep {
}
public function run(IOutput $output): void {
+ if (!$this->shouldRun()) {
+ return;
+ }
+
if ($this->manager->isEnabled()) {
if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') {
$this->config->setSystemValue('encryption.key_storage_migrated', false);