diff --git a/files/routes/comments.py b/files/routes/comments.py index a3dfc7dd10..b54ae349e9 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -46,6 +46,8 @@ def post_pid_comment_cid(cid, v, pid=None, anything=None, sub=None): comment = get_comment(cid, v=v) + if not User.can_see(v, comment): abort(403) + if comment.parent_post: post = comment.parent_post elif comment.wall_user_id: @@ -53,8 +55,6 @@ def post_pid_comment_cid(cid, v, pid=None, anything=None, sub=None): else: post = NOTIFICATION_THREAD - if not User.can_see(v, comment): abort(403) - if v and request.values.get("read"): gevent.spawn(_mark_comment_as_read, comment.id, v.id)