Skip to content

Commit 7fd7601

Browse files
authored
Merge pull request #24241 from nextcloud/enh/harden_EncryptionLegacyCipher_repair
Harden EncryptionLegacyCipher a bit
2 parents 0d30047 + b718038 commit 7fd7601

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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)