aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_App.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-11-26 16:44:20 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-12-04 17:05:22 +0100
commitcbb34af53f0e6a85375ef9223a9dd74b9ba646ce (patch)
treee1d0cf3eb914a7d1dc255a24af4785e7aa56f4c5 /lib/private/legacy/OC_App.php
parentf0862dcfaa0eee98a8cd5183f37cb92e96f5767a (diff)
downloadnextcloud-server-cbb34af53f0e6a85375ef9223a9dd74b9ba646ce.tar.gz
nextcloud-server-cbb34af53f0e6a85375ef9223a9dd74b9ba646ce.zip
Do not update incompatible apps
Previously there was no (platform) dependency check for an app that was installed before. So Nextcloud happily upgraded an app that now requires a php version newer than the current one. Which means in the lucky case you see a failing upgrade due to the language incompatibility, or in the unlucky case you see unexpected errors later in production. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/legacy/OC_App.php')
-rw-r--r--lib/private/legacy/OC_App.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 0b9ae8c8c53..fdbbb1be907 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -974,6 +974,15 @@ class OC_App {
\OC::$server->getAppManager()->clearAppsCache();
$appData = self::getAppInfo($appId);
+ $ignoreMaxApps = \OC::$server->getConfig()->getSystemValue('app_install_overwrite', []);
+ $ignoreMax = in_array($appId, $ignoreMaxApps, true);
+ \OC_App::checkAppDependencies(
+ \OC::$server->getConfig(),
+ \OC::$server->getL10N('core'),
+ $appData,
+ $ignoreMax
+ );
+
self::registerAutoloading($appId, $appPath, true);
self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']);