HTTP_REFERER seems NOT to get urldecoded, causing url already containing

a comma in calendar got double encoded, which stalls the calendar
(no access to calendar of "1%2C2"!)
This commit is contained in:
Ralf Becker 2009-11-27 12:35:57 +00:00
parent 5cb72ec6df
commit 734a9f6947

View File

@ -1619,7 +1619,8 @@ class common
*/
static function get_referer($default='',$referer='')
{
if (!$referer) $referer = $_SERVER['HTTP_REFERER'];
// HTTP_REFERER seems NOT to get urldecoded
if (!$referer) $referer = urldecode($_SERVER['HTTP_REFERER']);
$webserver_url = $GLOBALS['egw_info']['server']['webserver_url'];
if (empty($webserver_url) || $webserver_url{0} == '/') // url is just a path