Merge pull request #24241 from nextcloud/enh/harden_EncryptionLegacyCipher_repair

Harden EncryptionLegacyCipher a bit
This commit is contained in:
Roeland Jago Douma 2020-11-20 14:15:45 +01:00 committed by GitHub
commit 7fd7601016
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);