From 08e73d2c8f3c9cbed39a5b632907f8570d23440a Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 12 Jan 2016 18:41:11 +0100 Subject: 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. --- lib/private/updater.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/updater.php') 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'); -- cgit v1.2.3