diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-27 22:22:03 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-27 22:22:03 +0200 |
commit | 06e9ac8591648626e32611739181901a4ebabc1b (patch) | |
tree | 7e437fe689fe59b63d7a9589226f40890ef5637e | |
parent | 657d02371c2b905eaacc3fbd7ef22bde15ab1cf0 (diff) | |
download | nextcloud-server-06e9ac8591648626e32611739181901a4ebabc1b.tar.gz nextcloud-server-06e9ac8591648626e32611739181901a4ebabc1b.zip |
fix parsing of app parameter and fix external app
-rw-r--r-- | lib/base.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 1e28ea1ccfd..1ac25bc520d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -425,8 +425,17 @@ class OC{ //parse the given parameters self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files'); + if(substr_count(self::$REQUESTEDAPP, '?') != 0){ + $app = substr(self::$REQUESTEDAPP, 0, strpos(self::$REQUESTEDAPP, '?')); + $param = substr(self::$REQUESTEDAPP, strpos(self::$REQUESTEDAPP, '?') + 1); + parse_str($param, $get); + $_GET = array_merge($_GET, $get); + self::$REQUESTEDAPP = $app; + $_GET['app'] = $app; + } self::$REQUESTEDFILE = (isset($_GET['getfile'])?$_GET['getfile']:null); if(substr_count(self::$REQUESTEDFILE, '?') != 0){ + echo "WIN"; $file = substr(self::$REQUESTEDFILE, 0, strpos(self::$REQUESTEDFILE, '?')); $param = substr(self::$REQUESTEDFILE, strpos(self::$REQUESTEDFILE, '?') + 1); parse_str($param, $get); @@ -443,7 +452,6 @@ class OC{ exit; } } - //update path to lib base @file_put_contents(OC::$APPSROOT . '/apps/inc.php', '<?php require_once(\'' . OC::$SERVERROOT . '/lib/base.php' . '\'); ?>'); } |