Also handle legacy cipher support when encryption is disabled but an old master key is present

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-11-27 10:01:34 +01:00
parent 4d64ec9944
commit 04d67d558e
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
2 changed files with 4 additions and 2 deletions

View file

@ -58,7 +58,8 @@ class EncryptionLegacyCipher implements IRepairStep {
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', '') === '') {
$this->config->setSystemValue('encryption.legacy_format_support', true);
}

View file

@ -58,7 +58,8 @@ class EncryptionMigration implements IRepairStep {
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', '') === '') {
$this->config->setSystemValue('encryption.key_storage_migrated', false);
}