Index: branches/5.3.x/core/kernel/utility/http_query.php =================================================================== diff -u -r16519 -r16600 --- branches/5.3.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 16519) +++ branches/5.3.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 16600) @@ -1,6 +1,6 @@ Order = $order; - if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { - // when AJAX request is made from jQuery, then create ajax variable, - // so any logic based in it (like redirects) will not break down + if ( isset($_SERVER['HTTP_PROXY']) && PHP_SAPI !== 'cli' ) { + throw new RuntimeException('Web Requests with "Proxy" header are forbidden.'); + } + + if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) { + // When AJAX request is made from jQuery, then create ajax variable, + // so any logic based in it (like redirects) will not break down. $_GET['ajax'] = 'yes'; } @@ -358,6 +362,16 @@ trigger_error('Non mod-rewrite url "' . $_SERVER['REQUEST_URI'] . '" used', E_USER_NOTICE); $this->Application->Redirect('', $url_params); } + + if ( $this->Application->GetVar('is_friendly_url') ) { + $url_params = $this->getRedirectParams(); + + // No idea about how to check, that given template + // require category to be passed with it, so pass anyway. + $url_params['pass_category'] = 1; + + $this->Application->Redirect('', $url_params); + } } else { $this->Application->VerifyThemeId();