mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Tighten permissions checking on modmail responses
Prevents users who don't have permission to see a mail thread from submitting replies to it.
This commit is contained in:
@@ -1001,6 +1001,8 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
if isinstance(parent, Message):
|
||||
if not getattr(parent, "repliable", True):
|
||||
abort(403, 'forbidden')
|
||||
if not parent.can_view_slow():
|
||||
abort(403, 'forbidden')
|
||||
is_message = True
|
||||
should_ratelimit = False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user