diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-01-12 18:41:11 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-01-12 18:48:36 +0100 |
commit | 08e73d2c8f3c9cbed39a5b632907f8570d23440a (patch) | |
tree | a8746ac0139d24dec71846551ef88b14960767f9 /lib/private/updater.php | |
parent | eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759 (diff) | |
download | nextcloud-server-08e73d2c8f3c9cbed39a5b632907f8570d23440a.tar.gz nextcloud-server-08e73d2c8f3c9cbed39a5b632907f8570d23440a.zip |
Add hidden config switch to disable code integrity checking
This adds a hidden config flag that allows somebody to disable the code integrity check. If `integrity.check.disabled` is set to `true` in the config file:
1. The integrity check functions will return always an empty result
2. The integrity check is not performed when installing apps
3. The integrity check is not performed when updating apps
4. The integrity check is not performed when updating the core
Furthermore this adds support for a list of channels that the code checker will run on. At the moment this is only stable because I didn't want to break any build scripts that we have. Once we have a proper CA setup and updated the build process to sign the releases we can add the RC, alpha, beta as well as daily releases. So everything except "git" basically.
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 9ec72bab2f9..f2a24976e9a 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -345,8 +345,8 @@ class Updater extends BasicEmitter { //Invalidate update feed $this->config->setAppValue('core', 'lastupdatedat', 0); - // Check for code integrity on the stable channel - if(\OC_Util::getChannel() === 'stable') { + // Check for code integrity if not disabled + if(\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) { $this->emit('\OC\Updater', 'startCheckCodeIntegrity'); $this->checker->runInstanceVerification(); $this->emit('\OC\Updater', 'finishedCheckCodeIntegrity'); |