singleuser mixin: include check_xsrf_cookie in overrides

This commit is contained in:
Min RK
2024-04-04 11:05:10 +02:00
parent 42191672ac
commit f395acd9ca

View File

@@ -825,7 +825,7 @@ def patch_base_handler(BaseHandler, log=None):
# but we also need to ensure BaseHandler *itself* doesn't # but we also need to ensure BaseHandler *itself* doesn't
# override the public tornado API methods we have inserted. # override the public tornado API methods we have inserted.
# If they are defined in BaseHandler, explicitly replace them with our methods. # If they are defined in BaseHandler, explicitly replace them with our methods.
for name in ("get_current_user", "get_login_url"): for name in ("get_current_user", "get_login_url", "check_xsrf_cookie"):
if name in BaseHandler.__dict__: if name in BaseHandler.__dict__:
log.debug( log.debug(
f"Overriding {BaseHandler}.{name} with HubAuthenticatedHandler.{name}" f"Overriding {BaseHandler}.{name} with HubAuthenticatedHandler.{name}"