summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2021-11-01 15:20:23 +0100
committerUrban Müller2021-11-01 15:20:23 +0100
commit381e9cac09a6c393009be1033a908da9860e4e50 (patch)
treef7a99f30d2dddee1a8853fbab1d5348e6f2d9abe
parenta8c546f5bc086c9e66a67c62f44243216cfbc0a5 (diff)
downloaditools-381e9cac09a6c393009be1033a908da9860e4e50.tar.gz
itools-381e9cac09a6c393009be1033a908da9860e4e50.tar.bz2
itools-381e9cac09a6c393009be1033a908da9860e4e50.zip
report redirect loops
-rw-r--r--it_url.class3
1 files changed, 3 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index f37bf97..6a0b126 100644
--- a/it_url.class
+++ b/it_url.class
@@ -830,6 +830,9 @@ 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(U($_GET)))
+ it::error("redirect to self: $url");
+
if (EDC('noredir'))
{
if (!function_exists('a'))