Some robots doesn't set referer when they try to add comment
This commit is contained in:
parent
7fff2dbd2d
commit
7b93925d00
|
@ -802,7 +802,10 @@ def tinymcelist_edit(request, post_id):
|
|||
def add_comment(request, post_id, parent_id):
|
||||
from dynastie.generators import post
|
||||
|
||||
ref = request.META['HTTP_REFERER']
|
||||
if not 'HTTP_REFERER' in request.META:
|
||||
ref = "/"
|
||||
else:
|
||||
ref = request.META['HTTP_REFERER']
|
||||
|
||||
# Anti robot !!
|
||||
if request.POST['email'] != '':
|
||||
|
|
Loading…
Reference in New Issue
Block a user