From 381e9cac09a6c393009be1033a908da9860e4e50 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 1 Nov 2021 15:20:23 +0100 Subject: report redirect loops --- it_url.class | 3 +++ 1 file changed, 3 insertions(+) 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')) -- cgit v1.2.3