diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-04 10:47:33 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-04 10:47:33 +0200 |
commit | da355444f188561a50937198e92ffd3f8a425407 (patch) | |
tree | e2c53f289cbfcd0f7da11402ac8bd87dff1df17f | |
parent | 50af13373d340cba2bd5893ab4b01ffe851c952b (diff) |
Avoid obvious spam with a hidden field that must not be filled.
-rw-r--r-- | execute.php | 5 | ||||
-rw-r--r-- | includes/style.css | 3 | ||||
-rw-r--r-- | index.php | 1 |
3 files changed, 9 insertions, 0 deletions
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; @@ -126,6 +126,7 @@ final class LookingGlass { } } + print '<input type="text" id="dontlook" name="dontlook" placeholder="Don\'t look at me!" />'; print '</fieldset>'; print '</form>'; print '</div>'; |