mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 22:08:11 -05:00
Make POST_hide only allow Links through VByName.
Someone has been sending Comment fullnames to POST_hide and that results in an error on our side and a 500 for them. They really should be getting a proper error message back instead.
This commit is contained in:
@@ -1725,7 +1725,7 @@ class ApiController(RedditController):
|
||||
|
||||
@noresponse(VUser(),
|
||||
VModhash(),
|
||||
thing = VByName('id'))
|
||||
thing = VByName('id', thing_cls=Link))
|
||||
@api_doc(api_section.links_and_comments)
|
||||
def POST_hide(self, thing):
|
||||
if not thing: return
|
||||
|
||||
Reference in New Issue
Block a user