mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Remove obsolete /api/frame and /api/noframe endpoints.
These endpoints don't appear to have been used since reddit/reddit@a07c576d1a and I have verified via haproxy logs that they are not ever being called. This fixes two XSRF vulnerabilities reported by Jordan Milne (/u/largenocream).
This commit is contained in:
@@ -2777,26 +2777,6 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
|
||||
form.set_html(".status", _("password updated"))
|
||||
|
||||
|
||||
|
||||
@noresponse(VUser())
|
||||
def POST_noframe(self):
|
||||
"""
|
||||
removes the reddit toolbar if that currently the user's preference
|
||||
"""
|
||||
c.user.pref_frame = False
|
||||
c.user._commit()
|
||||
|
||||
|
||||
@noresponse(VUser())
|
||||
def POST_frame(self):
|
||||
"""
|
||||
undoes POST_noframe
|
||||
"""
|
||||
c.user.pref_frame = True
|
||||
c.user._commit()
|
||||
|
||||
|
||||
@require_oauth2_scope("subscribe")
|
||||
@noresponse(VUser(),
|
||||
VModhash(),
|
||||
|
||||
Reference in New Issue
Block a user