Permalink
Browse files

fix(legacy_urls): unset __elgg_uri to prevent infinite loops

On multiple redirects, __elgg_uri was being appended to the forward url thus causing infinite loops

Fixes #8494
  • Loading branch information...
hypeJunction committed Jun 16, 2015
1 parent e926bca commit 0c7687acdf1f92066af0fc9cb32673e8da0f8859
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/legacy_urls/start.php
@@ -77,6 +77,10 @@ function legacy_urls_prepare_url($url, array $query_vars = array()) {
}
$params = array_merge($params, $query_vars);
if ($params) {
+ if (!empty($params['__elgg_uri'])) {
+ // on multiple redirects, __elgg_uri is appended to the URL causing infinite loops #8494
+ unset($params['__elgg_uri']);
+ }
return elgg_http_add_url_query_elements($url, $params);
} else {
return $url;

0 comments on commit 0c7687a

Please sign in to comment.