summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index df4e91dda9f..31d96666985 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -823,12 +823,28 @@ class OC {
exit();
}
- $request = \OC::$server->getRequest()->getPathInfo();
- if (substr($request, -3) !== '.js') { // we need these files during the upgrade
+ $request = \OC::$server->getRequest();
+ $requestPath = $request->getPathInfo();
+ if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade
self::checkMaintenanceMode();
self::checkUpgrade();
}
+ // emergency app disabling
+ if ($requestPath === '/disableapp'
+ && $request->getMethod() === 'POST'
+ && ((string)$request->getParam('appid')) !== ''
+ ) {
+ \OCP\JSON::callCheck();
+ \OCP\JSON::checkAdminUser();
+ $appId = (string)$request->getParam('appid');
+ $appId = \OC_App::cleanAppId($appId);
+
+ \OC_App::disable($appId);
+ \OC_JSON::success();
+ exit();
+ }
+
// Always load authentication apps
OC_App::loadApps(['authentication']);