From f000a9b2325767dee7d3a1ccda7984ab5d26c9ba Mon Sep 17 00:00:00 2001 From: oricgn Date: Tue, 27 Sep 2016 15:05:42 +0200 Subject: [PATCH] Redirect to index.php when there's no query string Fixing #1000 --- addon.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addon.php b/addon.php index e038459da..403650bfe 100644 --- a/addon.php +++ b/addon.php @@ -78,6 +78,14 @@ require_once './common.php'; +// Search bots are trying to call this script without query string, +// redirect to homepage. +if (!$_GET && !$_POST && !$PHORUM['args']) { + header('HTTP/1.1 303 See Other'); + header('Location: index.php'); + exit; +} + // Bail out early if there are no modules enabled that implement // the addon hook. if (! isset($PHORUM["hooks"]["addon"])) trigger_error(