Skip to content
Snippets Groups Projects
Unverified Commit d7207d83 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #24409 from nextcloud/bugfix/24399

Also run repair steps when encryption is disabled but a legacy key is present
parents 0e99d3c1 04d67d55
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,8 @@ class EncryptionLegacyCipher implements IRepairStep { ...@@ -58,7 +58,8 @@ class EncryptionLegacyCipher implements IRepairStep {
return; return;
} }
if ($this->manager->isEnabled()) { $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId');
if ($this->manager->isEnabled() || !empty($masterKeyId)) {
if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') {
$this->config->setSystemValue('encryption.legacy_format_support', true); $this->config->setSystemValue('encryption.legacy_format_support', true);
} }
......
...@@ -58,7 +58,8 @@ class EncryptionMigration implements IRepairStep { ...@@ -58,7 +58,8 @@ class EncryptionMigration implements IRepairStep {
return; return;
} }
if ($this->manager->isEnabled()) { $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId');
if ($this->manager->isEnabled() || !empty($masterKeyId)) {
if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') { if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') {
$this->config->setSystemValue('encryption.key_storage_migrated', false); $this->config->setSystemValue('encryption.key_storage_migrated', false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment