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
parent e794d1f5d8
commit b71803802c
No known key found for this signature in database
GPG Key ID: F941078878347C0C
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);