fix loading of OC::$REQUESTEDAPP if WTFE the app parameter is given but empty aka /?app
This commit is contained in:
parent
eb192ff4f3
commit
cf1c3635ff
|
@ -438,7 +438,7 @@ class OC{
|
||||||
register_shutdown_function(array('OC_Helper','cleanTmp'));
|
register_shutdown_function(array('OC_Helper','cleanTmp'));
|
||||||
|
|
||||||
//parse the given parameters
|
//parse the given parameters
|
||||||
self::$REQUESTEDAPP = (isset($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files'));
|
self::$REQUESTEDAPP = (isset($_GET['app']) && trim($_GET['app']) != '' && !is_null($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files'));
|
||||||
if(substr_count(self::$REQUESTEDAPP, '?') != 0){
|
if(substr_count(self::$REQUESTEDAPP, '?') != 0){
|
||||||
$app = substr(self::$REQUESTEDAPP, 0, strpos(self::$REQUESTEDAPP, '?'));
|
$app = substr(self::$REQUESTEDAPP, 0, strpos(self::$REQUESTEDAPP, '?'));
|
||||||
$param = substr(self::$REQUESTEDAPP, strpos(self::$REQUESTEDAPP, '?') + 1);
|
$param = substr(self::$REQUESTEDAPP, strpos(self::$REQUESTEDAPP, '?') + 1);
|
||||||
|
|
Loading…
Reference in New Issue