Skip to content
Snippets Groups Projects
Commit 99a473bd authored by Georg Ehrke's avatar Georg Ehrke
Browse files

support file calls with parameter

parent 2e853137
No related branches found
No related tags found
No related merge requests found
......@@ -401,8 +401,12 @@ class OC{
self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files');
self::$REQUESTEDFILE = $_GET['file'];
if(substr_count(self::$REQUESTEDFILE, '?') != 0){
$pos = strpos(self::$REQUESTEDFILE, '?');
self::$REQUESTEDFILE = substr(self::$REQUESTEDFILE, 0, $pos);
$pos_questionmark = strpos(self::$REQUESTEDFILE, '?');
$pos_equal = strpos(self::$REQUESTEDFILE, '=');
$pos_and = strpos(self::$REQUESTEDFILE, '?');
$_GET[substr(self::$REQUESTEDFILE, $pos_questionmark + 1, $pos_equal - $pos_questionmark - 1)] = substr(self::$REQUESTEDFILE, $pos_equal + 1, $pos_and);
self::$REQUESTEDFILE = substr(self::$REQUESTEDFILE, 0, $pos_questionmark);
$_GET['file'] = OC::$REQUESTEDFILE;
}
self::$REQUESTEDFILE = (isset($_GET['file'])?(OC_Helper::issubdirectory(OC::$APPSROOT . '/' . self::$REQUESTEDAPP . '/' . self::$REQUESTEDFILE, OC::$APPSROOT . '/' . self::$REQUESTEDAPP)?self::$REQUESTEDFILE:null):null);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment