@@ -33,36 +33,36 @@ |
||
33 | 33 | |
34 | 34 | class EncryptionMigration implements IRepairStep { |
35 | 35 | |
36 | - /** @var IConfig */ |
|
37 | - private $config; |
|
38 | - /** @var IManager */ |
|
39 | - private $manager; |
|
36 | + /** @var IConfig */ |
|
37 | + private $config; |
|
38 | + /** @var IManager */ |
|
39 | + private $manager; |
|
40 | 40 | |
41 | - public function __construct(IConfig $config, |
|
42 | - IManager $manager) { |
|
43 | - $this->config = $config; |
|
44 | - $this->manager = $manager; |
|
45 | - } |
|
41 | + public function __construct(IConfig $config, |
|
42 | + IManager $manager) { |
|
43 | + $this->config = $config; |
|
44 | + $this->manager = $manager; |
|
45 | + } |
|
46 | 46 | |
47 | - public function getName(): string { |
|
48 | - return 'Check encryption key format'; |
|
49 | - } |
|
47 | + public function getName(): string { |
|
48 | + return 'Check encryption key format'; |
|
49 | + } |
|
50 | 50 | |
51 | - private function shouldRun(): bool { |
|
52 | - $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
53 | - return version_compare($versionFromBeforeUpdate, '20.0.0.1', '<='); |
|
54 | - } |
|
51 | + private function shouldRun(): bool { |
|
52 | + $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
53 | + return version_compare($versionFromBeforeUpdate, '20.0.0.1', '<='); |
|
54 | + } |
|
55 | 55 | |
56 | - public function run(IOutput $output): void { |
|
57 | - if (!$this->shouldRun()) { |
|
58 | - return; |
|
59 | - } |
|
56 | + public function run(IOutput $output): void { |
|
57 | + if (!$this->shouldRun()) { |
|
58 | + return; |
|
59 | + } |
|
60 | 60 | |
61 | - $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); |
|
62 | - if ($this->manager->isEnabled() || !empty($masterKeyId)) { |
|
63 | - if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') { |
|
64 | - $this->config->setSystemValue('encryption.key_storage_migrated', false); |
|
65 | - } |
|
66 | - } |
|
67 | - } |
|
61 | + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); |
|
62 | + if ($this->manager->isEnabled() || !empty($masterKeyId)) { |
|
63 | + if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') { |
|
64 | + $this->config->setSystemValue('encryption.key_storage_migrated', false); |
|
65 | + } |
|
66 | + } |
|
67 | + } |
|
68 | 68 | } |
@@ -33,36 +33,36 @@ |
||
33 | 33 | |
34 | 34 | class EncryptionLegacyCipher implements IRepairStep { |
35 | 35 | |
36 | - /** @var IConfig */ |
|
37 | - private $config; |
|
38 | - /** @var IManager */ |
|
39 | - private $manager; |
|
36 | + /** @var IConfig */ |
|
37 | + private $config; |
|
38 | + /** @var IManager */ |
|
39 | + private $manager; |
|
40 | 40 | |
41 | - public function __construct(IConfig $config, |
|
42 | - IManager $manager) { |
|
43 | - $this->config = $config; |
|
44 | - $this->manager = $manager; |
|
45 | - } |
|
41 | + public function __construct(IConfig $config, |
|
42 | + IManager $manager) { |
|
43 | + $this->config = $config; |
|
44 | + $this->manager = $manager; |
|
45 | + } |
|
46 | 46 | |
47 | - public function getName(): string { |
|
48 | - return 'Keep legacy encryption enabled'; |
|
49 | - } |
|
47 | + public function getName(): string { |
|
48 | + return 'Keep legacy encryption enabled'; |
|
49 | + } |
|
50 | 50 | |
51 | - private function shouldRun(): bool { |
|
52 | - $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
53 | - return version_compare($versionFromBeforeUpdate, '20.0.0.0', '<='); |
|
54 | - } |
|
51 | + private function shouldRun(): bool { |
|
52 | + $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
53 | + return version_compare($versionFromBeforeUpdate, '20.0.0.0', '<='); |
|
54 | + } |
|
55 | 55 | |
56 | - public function run(IOutput $output): void { |
|
57 | - if (!$this->shouldRun()) { |
|
58 | - return; |
|
59 | - } |
|
56 | + public function run(IOutput $output): void { |
|
57 | + if (!$this->shouldRun()) { |
|
58 | + return; |
|
59 | + } |
|
60 | 60 | |
61 | - $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); |
|
62 | - if ($this->manager->isEnabled() || !empty($masterKeyId)) { |
|
63 | - if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { |
|
64 | - $this->config->setSystemValue('encryption.legacy_format_support', true); |
|
65 | - } |
|
66 | - } |
|
67 | - } |
|
61 | + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); |
|
62 | + if ($this->manager->isEnabled() || !empty($masterKeyId)) { |
|
63 | + if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { |
|
64 | + $this->config->setSystemValue('encryption.legacy_format_support', true); |
|
65 | + } |
|
66 | + } |
|
67 | + } |
|
68 | 68 | } |