Handle LOGOUT_URL=None in the logout view
The view used to crash when `LOGOUT_URL` was not set and the user was connect via CAS. Cause: we assumed the result of `LogoutView.get_next_page()` to be a string and tried to prepend the domain name of the site to it. Fix: redirect to the CAS' logout view without any `next_page` parameter.
This commit is contained in:
parent
47f99f487e
commit
acea5a6f4e
|
@ -145,7 +145,7 @@ class LogoutView(auth_views.LogoutView):
|
|||
|
||||
# If the next_url is local (no hostname), make it absolute so that the user
|
||||
# is correctly redirected from CAS.
|
||||
if not urlparse(next_page).netloc:
|
||||
if next_page and not urlparse(next_page).netloc:
|
||||
request = self.request
|
||||
next_page = urlunparse(
|
||||
(request.scheme, request.get_host(), next_page, "", "", "")
|
||||
|
|
Loading…
Reference in a new issue