diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-04-04 23:32:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-04-11 09:32:33 +0200 |
commit | 7e7146db7fdefa7039ad5dd9653500589a1d0c51 (patch) | |
tree | be21d5f37601376d96afb96e696b4fd12ef98bf4 /lib/private/Updater.php | |
parent | 7641a1589f23eaddbbf3a953746ef1bf6f5234f8 (diff) | |
download | nextcloud-server-7e7146db7fdefa7039ad5dd9653500589a1d0c51.tar.gz nextcloud-server-7e7146db7fdefa7039ad5dd9653500589a1d0c51.zip |
Block install without CAN_INSTALL file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 313cfc82ffa..56bea90ddd7 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -111,6 +111,13 @@ class Updater extends BasicEmitter { $this->emit('\OC\Updater', 'maintenanceEnabled'); } + // Clear CAN_INSTALL file if not on git + if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { + if (!unlink(\OC::$configDir . '/CAN_INSTALL')) { + $this->log->error('Could not cleanup CAN_INSTALL from your config folder. Please remove this file manually.'); + } + } + $installedVersion = $this->config->getSystemValue('version', '0.0.0'); $currentVersion = implode('.', \OCP\Util::getVersion()); |