From 739b0c7f8167b0ec086ce7823fcbd1a8fedf4f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Wed, 24 Aug 2022 11:08:56 +0200 Subject: [PATCH] fixed logout absolute url building on logout --- server/src/uds/core/auths/auth.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/uds/core/auths/auth.py b/server/src/uds/core/auths/auth.py index cfefcfbf..22a8a7b4 100644 --- a/server/src/uds/core/auths/auth.py +++ b/server/src/uds/core/auths/auth.py @@ -422,8 +422,7 @@ def webLogout( Helper function to clear user related data from session. If this method is not used, the session we be cleaned anyway by django in regular basis. """ - if exit_url is None: - exit_url = reverse('page.login') + exit_url = exit_url or reverse('page.login') try: if request.user: authenticator = request.user.manager.getInstance() @@ -446,7 +445,7 @@ def webLogout( request.session.flush() request.authorized = False - response = HttpResponseRedirect(request.build_absolute_uri(exit_url)) + response = HttpResponseRedirect(exit_url) if authenticator: authenticator.webLogoutHook(username, request, response) return response