git » blitiri » commit aa5f931

Only handle comments when they are enabled

author Alberto Bertogli
2008-09-06 15:57:35 UTC
committer Alberto Bertogli
2008-09-06 15:57:35 UTC
parent f70bd09d2de2e429a68832018e01c178bc0b6f09

Only handle comments when they are enabled

If malicious users want to post comments when they are disabled, we
shouldn't let them!

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

blitiri.cgi +1 -1

diff --git a/blitiri.cgi b/blitiri.cgi
index 60c86ea..a0334e4 100755
--- a/blitiri.cgi
+++ b/blitiri.cgi
@@ -1218,7 +1218,7 @@ def handle_cgi():
 		articles = db.get_articles()
 		articles.sort(cmp = Article.title_cmp)
 		render_artlist(articles, db)
-	elif comment:
+	elif comment and enable_comments:
 		form_data = CommentFormData(author.strip().replace('\n', ' '),
 				link.strip().replace('\n', ' '), captcha,
 				body.replace('\r', ''))