diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-03 23:08:04 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-03 23:08:04 +0100 |
commit | a899ce1c22386b9ff882048cba35d46f560ee654 (patch) | |
tree | 892c93a0a3e434b6e8ff8c04d3d7107cf1e12750 /Zotlabs | |
parent | 0ce7358f0f00cb000562dc34be13459eb5779c18 (diff) | |
parent | fae9c236371ba70b2ac7624d6020c76a77c1944d (diff) | |
download | volse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.tar.gz volse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.tar.bz2 volse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Cloud.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php index 75191a279..d2264092b 100644 --- a/Zotlabs/Module/Cloud.php +++ b/Zotlabs/Module/Cloud.php @@ -57,12 +57,21 @@ class Cloud extends \Zotlabs\Web\Controller { $auth->observer = $ob_hash; } + // if we arrived at this path with any query parameters in the url, build a clean url without + // them and redirect. + // @fixme if the filename has an ampersand in it AND there are query parameters, + // this may not do the right thing. + + if((strpos($_SERVER['QUERY_STRING'],'?') !== false) || (strpos($_SERVER['QUERY_STRING'],'&') !== false && strpos($_SERVER['QUERY_STRING'],'&') === false)) { + $path = z_root(); + if(argc()) { + foreach(\App::$argv as $a) { + $path .= '/' . $a; + } + } + goaway($path); + } - $_SERVER['QUERY_STRING'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['QUERY_STRING']); - $_SERVER['QUERY_STRING'] = strip_zids($_SERVER['QUERY_STRING']); - - $_SERVER['REQUEST_URI'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['REQUEST_URI']); - $_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']); $rootDirectory = new \Zotlabs\Storage\Directory('/', $auth); |