Merge pull request #24249 from nextcloud/backport/24241/stable20
[stable20] Harden EncryptionLegacyCipher a bit
This commit is contained in:
commit
347aaf23b2
|
@ -54,6 +54,10 @@ class EncryptionLegacyCipher implements IRepairStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run(IOutput $output): void {
|
public function run(IOutput $output): void {
|
||||||
|
if (!$this->shouldRun()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->manager->isEnabled()) {
|
if ($this->manager->isEnabled()) {
|
||||||
if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') {
|
if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') {
|
||||||
$this->config->setSystemValue('encryption.legacy_format_support', true);
|
$this->config->setSystemValue('encryption.legacy_format_support', true);
|
||||||
|
|
|
@ -54,6 +54,10 @@ class EncryptionMigration implements IRepairStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run(IOutput $output): void {
|
public function run(IOutput $output): void {
|
||||||
|
if (!$this->shouldRun()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->manager->isEnabled()) {
|
if ($this->manager->isEnabled()) {
|
||||||
if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') {
|
if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') {
|
||||||
$this->config->setSystemValue('encryption.key_storage_migrated', false);
|
$this->config->setSystemValue('encryption.key_storage_migrated', false);
|
||||||
|
|
Loading…
Reference in New Issue