Skip to content

Commit

Permalink
do no longer allow anonymous users to post comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Jul 13, 2009
1 parent 635c802 commit ff1456f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils.py
Expand Up @@ -76,11 +76,16 @@ def comment_spam_test(**kwargs):
'Hello. And Bye.',
'http://quick-ways-to-earn-extra-cash.blogspot.com/'
'earn money online',
'http://www.mydatelove.com',
'best buy and loss weight',
]

comment=kwargs['comment'].comment
request=kwargs['request']

if not request.user.is_authenticated():
return False

if not comment or comment in blacklist_identical:
return False

Expand Down

0 comments on commit ff1456f

Please sign in to comment.