diff options
-rw-r--r-- | it_url.class | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index d66125d..ec4d62d 100644 --- a/it_url.class +++ b/it_url.class @@ -882,8 +882,11 @@ static function redirect($url = null, $type = "temporary") $url = preg_replace("/[\r\n].*/", '', it_url::absolute($url)); # Security: cut after CR/LF - if (!$_POST && $url == it_url::absolute($_SERVER['REQUEST_URI'])) - it::error("redirect to self. " . it_url::absolute($_SERVER['REQUEST_URI']) . " -> $url"); + if (EDC('utest')) + $url = it::replace(['[?&]uok=1' => ""], $url); # remove marker for correctly passed through U() + + if (!$_POST && $url == static::absolute($_SERVER['REQUEST_URI'])) + it::error("redirect to self. " . static::absolute($_SERVER['REQUEST_URI']) . " -> $url"); if (EDC('noredir')) { |