aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-17 10:58:34 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-17 13:09:22 +0100
commit979a3ff8300487a96f07f18f454c5437dbc62f1b (patch)
tree19ed0df5f93f703b80389477488b15af2c8de5ff
parent828cb08d49ae9fe6e01da53fb7373eb386743cd4 (diff)
downloadnextcloud-server-979a3ff8300487a96f07f18f454c5437dbc62f1b.tar.gz
nextcloud-server-979a3ff8300487a96f07f18f454c5437dbc62f1b.zip
Escape App ID
While all callers do this as well this prevents a misuse of the API by mistake.
-rw-r--r--lib/private/route/router.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 13f7a7a1cfb..03bee3d2037 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -110,6 +110,10 @@ class Router implements IRouter {
* @param null|string $app
*/
public function loadRoutes($app = null) {
+ if(is_string($app)) {
+ $app = \OC_App::cleanAppId($app);
+ }
+
$requestedApp = $app;
if ($this->loaded) {
return;