From f28a28c46b8c234b070eef2329195f9b064af93c Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Oct 05 2016 19:10:28 +0000 Subject: Make sure that openid redirects back to root on no request If there is no request, we redirect to self.basepath, but if Ipsilon is mounted to the root (/), basepath is set to None. Sending a HTTPRedirect(None) redirects back to the current page. So this change makes OpenID send the user to / in this case. Fixes: #225 Signed-off-by: Patrick Uiterwijk Reviewed-by: Randy Barlow Reviewed-by: Howard Johnson --- diff --git a/ipsilon/providers/openid/auth.py b/ipsilon/providers/openid/auth.py index d8f02cd..0a8672c 100644 --- a/ipsilon/providers/openid/auth.py +++ b/ipsilon/providers/openid/auth.py @@ -85,7 +85,7 @@ class AuthenticateRequest(ProviderPageBase): if request is None: self.debug('No request') - raise cherrypy.HTTPRedirect(self.basepath) + raise cherrypy.HTTPRedirect(self.basepath or '/') return request