handle allow_origin='*' in check_referrer

allow_origin can be the wildcard '*' to allow any host

check_referer should match check_origin
This commit is contained in:
Min RK 2020-12-04 12:05:46 +01:00
parent eb2b4c6a7f
commit 067c3993f2

View File

@ -404,6 +404,10 @@ class IPythonHandler(AuthenticatedHandler):
Used on GET for api endpoints and /files/
to block cross-site inclusion (XSSI).
"""
if self.allow_origin == "*" or self.skip_check_origin():
return True
host = self.request.headers.get("Host")
referer = self.request.headers.get("Referer")