Merge pull request #24249 from nextcloud/backport/24241/stable20

[stable20] Harden EncryptionLegacyCipher a bit
This commit is contained in:
Morris Jobke 2020-11-20 22:42:17 +01:00 committed by GitHub
commit 347aaf23b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);