]> git.llucax.com Git - software/blitiri.git/commitdiff
Only handle comments when they are enabled
authorAlberto Bertogli <albertito@blitiri.com.ar>
Sat, 6 Sep 2008 15:57:35 +0000 (12:57 -0300)
committerAlberto Bertogli <albertito@blitiri.com.ar>
Sat, 6 Sep 2008 15:57:35 +0000 (12:57 -0300)
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

index 60c86ea49aa3a9ee8735b6d59d3d7964c1a1010f..a0334e4e08e2d7257f12e2718f13e9322401431a 100755 (executable)
@@ -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', ''))