fix redirect loop initiated eg. by saving a mail, caused by document.location=url triggering etemplate unload handler and destroying et2 request, identical redirect url detected by jdots framework causes refresh via nextmatch --> next redirect

This commit is contained in:
Ralf Becker
2014-10-08 20:02:59 +00:00
parent 2ca305b5cc
commit 178bca7f7a
4 changed files with 39 additions and 27 deletions

View File

@ -177,6 +177,8 @@ class etemplate_request
list($app) = explode('.', $_GET['menuaction']);
$index_url = isset($GLOBALS['egw_info']['apps'][$app]['index']) ?
'/index.php?menuaction='.$GLOBALS['egw_info']['apps'][$app]['index'] : '/'.$app.'/index.php';
// add a unique token to redirect to avoid client-side framework tries refreshing via nextmatch
$index_url .= (strpos($index_url, '?') ? '&' : '?').'redirect='.microtime(true);
error_log(__METHOD__."('$id', ...) eT2 request not found / expired --> redirecting app $app to $index_url (_GET[menuaction]=$_GET[menuaction], isJSONRequest()=".array2string(egw_json_request::isJSONRequest()).')');
if (egw_json_request::isJSONRequest())
{