aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-20 22:42:17 +0100
committerGitHub <noreply@github.com>2020-11-20 22:42:17 +0100
commit347aaf23b2c0c9c6f2ebaffbeebc79a266b875f7 (patch)
treebc18a80c946cd708a496a9efadbe28e6b50d373a /lib/private
parente772fd64096288b2a9c00c74d92ce033bba17479 (diff)
parent06286f8c0e08b230f2ddf23295782ee65f352455 (diff)
downloadnextcloud-server-347aaf23b2c0c9c6f2ebaffbeebc79a266b875f7.tar.gz
nextcloud-server-347aaf23b2c0c9c6f2ebaffbeebc79a266b875f7.zip
Merge pull request #24249 from nextcloud/backport/24241/stable20
[stable20] Harden EncryptionLegacyCipher a bit
Diffstat (limited to 'lib/private')
-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);