From 46d915c5b09e55fd92ccede7c1d15ccb84e6a093 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig <dominik@suma-ev.de> Date: Mon, 30 Jan 2017 10:37:27 +0100 Subject: [PATCH] =?UTF-8?q?Filterregel=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetaGer.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/MetaGer.php b/app/MetaGer.php index 8d4d60d82..46b98c89a 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -330,7 +330,17 @@ class MetaGer public function doBotProtection($bot) { $hash = md5(date('YmdHi')); - if ((preg_match("/^\d+$/s", $this->getEingabe()) || strpos($this->request->input('focus'), "%3bamp") !== FALSE ) && $bot !== $hash) { + + $shouldCheck = false; + + foreach ($this->request->all() as $key => $value) { + if (strpos($key, "amp;") !== false) { + $shouldCheck = true; + break; + } + } + + if ((preg_match("/^\d+$/s", $this->getEingabe()) || $shouldCheck) && $bot !== $hash) { return true; } else { return false; -- GitLab