If I'm at this page:
and I login with openid, I end up at this page :
I think this stems from line 253 in views.py
if not redirect_to or '//' in redirect_to or ' ' in redirect_to:
since I have a // in my redirect_to link.
I think you are trying to make sure the redirect is actually on this host. You already have a "clean_next" in the utils, why isn't it used here?