From da355444f188561a50937198e92ffd3f8a425407 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Wed, 4 Jun 2014 10:47:33 +0200 Subject: Avoid obvious spam with a hidden field that must not be filled. --- execute.php | 5 +++++ includes/style.css | 3 +++ index.php | 1 + 3 files changed, 9 insertions(+) diff --git a/execute.php b/execute.php index 80d4b8d..9ccbd9b 100644 --- a/execute.php +++ b/execute.php @@ -23,6 +23,11 @@ require_once 'config.php'; require_once 'router.php'; require_once 'utils.php'; +// Obvious spam +if (isset($_POST['dontlook']) || !empty($_POST['dontlook'])) { + die('Spam detected'); +} + if (isset($_POST['query']) && !empty($_POST['query']) && isset($_POST['routers']) && !empty($_POST['routers']) && isset($_POST['parameters']) && !empty($_POST['parameters'])) { diff --git a/includes/style.css b/includes/style.css index eaf5561..0c815ba 100644 --- a/includes/style.css +++ b/includes/style.css @@ -48,6 +48,9 @@ body { margin-left: auto; margin-right: auto; } +#dontlook { + display: none; +} pre { color: #FFFFFF; background-color: #000000; diff --git a/index.php b/index.php index 984763e..d9ab19f 100644 --- a/index.php +++ b/index.php @@ -126,6 +126,7 @@ final class LookingGlass { } } + print ''; print ''; print ''; print ''; -- cgit v1.2.3