Also checks for 'email' field to be present

This commit is contained in:
Gregory Soutade 2016-06-13 07:37:53 +02:00
parent 05c92a1738
commit e029a1fc35

View File

@ -808,7 +808,7 @@ def add_comment(request, post_id, parent_id):
ref = request.META['HTTP_REFERER']
# Anti robot !!
if request.POST['email'] != '':
if not 'email' in request.POST or request.POST['email'] != '':
if 'HTTP_X_REAL_IP' in request.META:
print 'Dynastie : fucking robot %s' % (request.META['HTTP_X_REAL_IP'])
else: