diff options
author | Ruben Homs <ruben@homs.codes> | 2018-10-29 15:36:16 +0100 |
---|---|---|
committer | Ruben Homs <ruben@homs.codes> | 2019-05-21 09:24:50 +0200 |
commit | 98047e8c1cd8c741f4a3d63b970f7e15fa76c128 (patch) | |
tree | f9058ccf218d466a04da8f64bb803ee92f4d556d /core/Command/Encryption/DecryptAll.php | |
parent | 50dbdeea46b3891fad9793899ddcdcf20586f2d7 (diff) | |
download | nextcloud-server-98047e8c1cd8c741f4a3d63b970f7e15fa76c128.tar.gz nextcloud-server-98047e8c1cd8c741f4a3d63b970f7e15fa76c128.zip |
Stop decryption when maintenance mode is enabled, fixes #8311
Signed-off-by: Ruben Homs <ruben@homs.codes>
Diffstat (limited to 'core/Command/Encryption/DecryptAll.php')
-rw-r--r-- | core/Command/Encryption/DecryptAll.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 6ae90196963..2d45689d1b3 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -132,6 +132,15 @@ class DecryptAll extends Command { return; } + $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); + if ($isMaintenanceModeEnabled) { + $output->writeln("Maintenance mode must be disabled when starting decryption,"); + $output->writeln("in order to load the relevant encryption modules correctly."); + $output->writeln("Your instance will automatically be put to maintenance mode"); + $output->writeln("during the actual decryption of the files."); + return; + } + try { if ($this->encryptionManager->isEnabled() === true) { $output->write('Disable server side encryption... '); |