From 732adea99775c935e6e45c5ec2d3fe3f57b2f053 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 9 Dec 2016 15:34:32 +0100 Subject: [PATCH] Don't warn about empty next_url empty next_url is fine --- jupyterhub/handlers/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/')):