From 9d83b0f9875b2b61f63573351d1f2762c3524060 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 14 Dec 2017 17:12:33 +0100 Subject: [PATCH] Do not auto-disable apps of certain types Whenever the file appinfo/app.php throws an exception, the app manager would disable the app automatically, believing it is broken. While this might work fine for broken third party apps, it is crucial to keep filesystem and authentication apps enabled in case of random errors (like Redis being temporarily not available) --- lib/private/legacy/app.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index dcf7b323996f..5b9e52d46f14 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -245,8 +245,12 @@ private static function requireAppFile($app) { \OC::$server->getLogger()->logException($ex); $blacklist = \OC::$server->getAppManager()->getAlwaysEnabledApps(); if (!in_array($app, $blacklist)) { - \OC::$server->getLogger()->warning('Could not load app "' . $app . '", it will be disabled', array('app' => 'core')); - self::disable($app); + if (!self::isType($app, ['authentication', 'filesystem'])) { + \OC::$server->getLogger()->warning('Could not load app "' . $app . '", it will be disabled', array('app' => 'core')); + self::disable($app); + } else { + \OC::$server->getLogger()->warning('Could not load app "' . $app . '", see exception above', array('app' => 'core')); + } } throw $ex; }