changeset 1570:8bfaae6fa0a5

kick spammers by triggering surge protection
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Sep 2006 21:21:55 +0200
parents 94daf7c80f6a
children 8db7120ab81e
files MoinMoin/action/edit.py MoinMoin/action/fullsearch.py
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/edit.py	Mon Sep 18 21:11:56 2006 +0200
+++ b/MoinMoin/action/edit.py	Mon Sep 18 21:21:55 2006 +0200
@@ -18,6 +18,7 @@
     if request.form.has_key('button_preview') and request.form.has_key('button_spellcheck'):
         # multiple buttons pressed at once? must be some spammer/bot
         request.makeForbidden403()
+        request.surge_protect(kick_him=True) # get rid of him
         request.log("LOL, some spammer pressed multiple buttons at once ...")
         return
 
--- a/MoinMoin/action/fullsearch.py	Mon Sep 18 21:11:56 2006 +0200
+++ b/MoinMoin/action/fullsearch.py	Mon Sep 18 21:21:55 2006 +0200
@@ -61,6 +61,7 @@
     titlesearch = checkTitleSearch(request)
     if titlesearch < 0:
         request.makeForbidden403()
+        request.surge_protect(kick_him=True) # get rid of spammer
         request.log("LOL, some spammer pressed multiple buttons at once ...")
         return