From 0ec90fd7bb857d3986fdd91b3b74edb4931107d1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 30 Dec 2010 20:12:57 +0100 Subject: add simple botfiltering Bots tend to fill out all fields, so add a hidden "email" field that will prevent the text from being saved. Signed-off-by: Florian Pritz --- system/application/controllers/file.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'system/application/controllers/file.php') diff --git a/system/application/controllers/file.php b/system/application/controllers/file.php index e42d1d3db..4fed02599 100644 --- a/system/application/controllers/file.php +++ b/system/application/controllers/file.php @@ -129,6 +129,9 @@ class File extends Controller { $data = array(); $content = $this->input->post('content')."\n"; $extension = $this->input->post('extension'); + // Try to filter spambots + if ($this->input->post("email") != "") return; + // prevent empty pastes from the upload form if($content === "\n") { $this->upload_form(); -- cgit v1.2.3-24-g4f1b