Skip to content

Commit

Permalink
Make POST_hide only allow Links through VByName.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spladug authored and shlurbee committed Jul 6, 2012
1 parent 85f6b2a commit 77ba2db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r2/r2/controllers/api.py
Expand Up @@ -1725,7 +1725,7 @@ def POST_read_message(self, things):

@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
Expand Down

0 comments on commit 77ba2db

Please sign in to comment.