diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-12-30 20:12:57 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-12-30 20:12:57 +0100 |
commit | 0ec90fd7bb857d3986fdd91b3b74edb4931107d1 (patch) | |
tree | 49df1a5fecec6adc960a64b658bce2dbef34fad2 /system/application/controllers | |
parent | debb9053f737f8f51b8cc402d7d18b8f0a1ee70a (diff) |
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 <bluewind@xssn.at>
Diffstat (limited to 'system/application/controllers')
-rw-r--r-- | system/application/controllers/file.php | 3 |
1 files changed, 3 insertions, 0 deletions
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(); |