escape oauth_redirect_uri when adding into handlers
@@ -558,7 +558,7 @@ class BinderHub(Application):
oauth_redirect_uri = os.getenv('JUPYTERHUB_OAUTH_CALLBACK_URL') or \
url_path_join(self.base_url, 'oauth_callback')
oauth_redirect_uri = urlparse(oauth_redirect_uri).path
- handlers.insert(-1, (oauth_redirect_uri, HubOAuthCallbackHandler))
+ handlers.insert(-1, (re.escape(oauth_redirect_uri), HubOAuthCallbackHandler))
self.tornado_app = tornado.web.Application(handlers, **self.tornado_settings)
def stop(self):
