Harden EncryptionLegacyCipher a bit

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-11-20 09:46:31 +01:00 committed by backportbot[bot]
parent 322b0ab2b3
commit 06286f8c0e
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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);