diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-11-20 09:46:31 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-11-20 09:52:55 +0100 |
commit | b71803802ca7684484ce97f0e07c8da37445b1b8 (patch) | |
tree | 8267aa11e5e5802fe999a3771bd1a7bfe24c2302 /lib/private/Repair | |
parent | e794d1f5d8757ddd4cbf1575b72d37b881c50ddb (diff) | |
download | nextcloud-server-b71803802ca7684484ce97f0e07c8da37445b1b8.tar.gz nextcloud-server-b71803802ca7684484ce97f0e07c8da37445b1b8.zip |
Harden EncryptionLegacyCipher a bit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Repair')
-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); |