From 60ded7280bf6c95a24ec14aa64de083dc4234d43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 6 Dec 2009 14:23:28 +0000 Subject: [PATCH] Spiders should not be allowed, sometimes, to follow redirects via HTML (e.g. in banners) --- inc/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 0dbe4ae0d2..aec4292947 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -922,7 +922,7 @@ function makeTime ($hours, $minutes, $seconds, $stamp) { } // Redirects to an URL and if neccessarry extends it with own base URL -function redirectToUrl ($URL) { +function redirectToUrl ($URL, $allowSpider = true) { // Compile out codes eval('$URL = "' . compileRawCode(encodeUrl($URL)) . '";'); @@ -941,7 +941,7 @@ function redirectToUrl ($URL) { //* DEBUG: */ die($URL); // Simple probe for bots/spiders from search engines - if (isSpider()) { + if ((isSpider()) && ($allowSpider === true)) { // Secure the URL against bad things such als HTML insertions and so on... $URL = secureString($URL); -- 2.39.5