mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
/gold: Ensure user should be allowed to see a comment.
This fixes an information disclosure vulnerability reported by Jordan Milne (/u/largenocream).
This commit is contained in:
@@ -1494,8 +1494,8 @@ class FormsController(RedditController):
|
||||
|
||||
if comment:
|
||||
comment_sr = Subreddit._byID(comment.sr_id, data=True)
|
||||
if (comment._deleted or
|
||||
comment._spam or
|
||||
if (comment._deleted or comment._spam or
|
||||
not comment_sr.can_view(c.user) or
|
||||
not comment_sr.allow_comment_gilding):
|
||||
comment = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user