mirror of
https://github.com/nextcloud/server.git
synced 2026-03-21 18:11:02 -04:00
This enforces proper types on POST and GET arguments where I considered it sensible. I didn't update some as I don't know what kind of values they would support 🙈 Fixes https://github.com/owncloud/core/issues/14196 for core
18 lines
470 B
PHP
18 lines
470 B
PHP
<?php
|
|
OCP\JSON::checkAdminUser();
|
|
OCP\JSON::callCheck();
|
|
|
|
if (!array_key_exists('appid', $_POST)) {
|
|
OC_JSON::error();
|
|
exit;
|
|
}
|
|
|
|
$appId = (string)$_POST['appid'];
|
|
$appId = OC_App::cleanAppId($appId);
|
|
|
|
// FIXME: Clear the cache - move that into some sane helper method
|
|
\OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-0');
|
|
\OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-1');
|
|
|
|
OC_App::disable($appId);
|
|
OC_JSON::success();
|