Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions jupyterlab_tensorboard_pro/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ def check_xsrf_cookie(self):
See https://github.com/tensorflow/tensorboard/issues/4685

"""
if not hasattr(self, "_jupyter_current_user"):
# Called too early, will be checked later
return None

if self.token_authenticated or self.settings.get("disable_check_xsrf", False):
# Token-authenticated requests do not need additional XSRF-check
# Servers without authentication are vulnerable to XSRF
return None

# Check XSRF token
try:
Expand Down