tuning anti-spam honeypot
This commit is contained in:
@@ -43,16 +43,16 @@ def home(request):
|
||||
name = ''
|
||||
email = ''
|
||||
comments = ''
|
||||
antispams = ''
|
||||
matngot = ''
|
||||
|
||||
if 'form.submitted' in request.params :
|
||||
name = request.params['name']
|
||||
email = request.params['email']
|
||||
comments = request.params['comments']
|
||||
antispams = request.params['antispams']
|
||||
matngot = request.params['matngot']
|
||||
|
||||
# antispams filled ?
|
||||
if not antispams and comments != '':
|
||||
# honeypot matngot filled ?
|
||||
if not matngot and comments != '':
|
||||
# no, message is not spam, send it
|
||||
body = """
|
||||
Bonjour,
|
||||
|
||||
Reference in New Issue
Block a user