Skip to content

Commit 31a1ca1

Browse files
committed
Fixed issue checking for captcha when it is not supplied.
1 parent 46c0a0e commit 31a1ca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

handlers/bloog/blog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ def process_comment_submission(handler, article):
243243

244244
# If we aren't administrator, abort if bad captcha
245245
if not users.is_current_user_admin():
246-
if property_hash['captcha'] != get_captcha(article.key()):
246+
if property_hash.get('captcha', None) != get_captcha(article.key()):
247247
logging.info("Received captcha (%s) != %s",
248-
property_hash['captcha'],
248+
property_hash.get('captcha', None),
249249
get_captcha(article.key()))
250250
handler.error(401) # Unauthorized
251251
return

0 commit comments

Comments
 (0)