Skip to content

Commit b718038

Browse files
committed
Harden EncryptionLegacyCipher a bit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent e794d1f commit b718038

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/private/Repair/NC20/EncryptionLegacyCipher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ private function shouldRun(): bool {
5454
}
5555

5656
public function run(IOutput $output): void {
57+
if (!$this->shouldRun()) {
58+
return;
59+
}
60+
5761
if ($this->manager->isEnabled()) {
5862
if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') {
5963
$this->config->setSystemValue('encryption.legacy_format_support', true);

lib/private/Repair/NC20/EncryptionMigration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ private function shouldRun(): bool {
5454
}
5555

5656
public function run(IOutput $output): void {
57+
if (!$this->shouldRun()) {
58+
return;
59+
}
60+
5761
if ($this->manager->isEnabled()) {
5862
if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') {
5963
$this->config->setSystemValue('encryption.key_storage_migrated', false);

0 commit comments

Comments
 (0)