Merge pull request #24737 from nextcloud/fix/23544/unset_parameter

Also unset the other possible unused paramters
This commit is contained in:
Roeland Jago Douma 2020-12-18 08:38:45 +01:00 committed by GitHub
commit 6228cbe852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -297,6 +297,7 @@ class Router implements IRouter {
if (isset($parameters['caller'])) {
$caller = $parameters['caller'];
unset($parameters['caller']);
unset($parameters['action']);
$application = $this->getApplicationClass($caller[0]);
\OC\AppFramework\App::main($caller[1], $caller[2], $application->getContainer(), $parameters);
} elseif (isset($parameters['action'])) {
@ -305,6 +306,7 @@ class Router implements IRouter {
throw new \Exception('not a callable action');
}
unset($parameters['action']);
unset($parameters['caller']);
call_user_func($action, $parameters);
} elseif (isset($parameters['file'])) {
include $parameters['file'];