diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py index 1962f74a..3e6f40f4 100644 --- a/jupyterhub/handlers/pages.py +++ b/jupyterhub/handlers/pages.py @@ -28,7 +28,7 @@ class RootHandler(BaseHandler): """ def get(self): next_url = self.get_argument('next', '') - if not next_url.startswith('/'): + if next_url and not next_url.startswith('/'): self.log.warning("Disallowing redirect outside JupyterHub: %r", next_url) next_url = '' if next_url and next_url.startswith(url_path_join(self.base_url, 'user/')):