Check XSRF tokens on all non-idempotent requests instead of just POST.
This commit is contained in:
parent
2d42c18c36
commit
b7e8930b82
|
@ -853,7 +853,7 @@ class RequestHandler(object):
|
|||
raise HTTPError(405)
|
||||
# If XSRF cookies are turned on, reject form submissions without
|
||||
# the proper cookie
|
||||
if self.request.method == "POST" and \
|
||||
if self.request.method not in ("GET", "HEAD") and \
|
||||
self.application.settings.get("xsrf_cookies"):
|
||||
self.check_xsrf_cookie()
|
||||
self.prepare()
|
||||
|
|
Loading…
Reference in New Issue