diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-11-20 09:46:31 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-20 13:18:25 +0000 |
commit | 06286f8c0e08b230f2ddf23295782ee65f352455 (patch) | |
tree | c0f83ceadc0a65316542a33424f99f1a09bf99e7 | |
parent | 322b0ab2b393a5e0416858b81125d4ae88e397af (diff) | |
download | nextcloud-server-06286f8c0e08b230f2ddf23295782ee65f352455.tar.gz nextcloud-server-06286f8c0e08b230f2ddf23295782ee65f352455.zip |
Harden EncryptionLegacyCipher a bit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Repair/NC20/EncryptionLegacyCipher.php | 4 | ||||
-rw-r--r-- | lib/private/Repair/NC20/EncryptionMigration.php | 4 |
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); |