hide tracking pixel and add 403 to comment pages on private reddits

This commit is contained in:
KeyserSosa
2008-07-25 14:58:15 -07:00
parent 348bad9f46
commit 557a248f2a
2 changed files with 5 additions and 2 deletions

View File

@@ -117,11 +117,14 @@ class FrontController(RedditController):
num_comments = VMenu('controller', NumCommentsMenu))
def GET_comments(self, article, comment, context, sort, num_comments):
"""Comment page for a given 'article'."""
if comment and comment.link_id != article._id:
if comment and comment.link_id != article._id:
return self.abort404()
if not c.default_sr and c.site._id != article.sr_id:
return self.abort404()
if not article.subreddit_slow.can_view(c.user):
abort(403, 'forbidden')
#check for 304
self.check_modified(article, 'comments')

View File

@@ -44,7 +44,7 @@
dict(year=2008)}
</p>
%if g.tracker_url:
<img alt="innocuous" src="${tracking.gen_url()}"/>
<img alt="" src="${tracking.gen_url()}"/>
%endif
</div>