From 849a5bb0f367aaca3ad25b5aa4e3a5d280d07566 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 10 Mar 2014 15:25:54 +0100 Subject: [PATCH] views: when getting the host name from the HTTP_HOST environment variable remove the port --- authentic2_idp_ltpa/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentic2_idp_ltpa/views.py b/authentic2_idp_ltpa/views.py index d0d9446..b8756c6 100644 --- a/authentic2_idp_ltpa/views.py +++ b/authentic2_idp_ltpa/views.py @@ -16,7 +16,7 @@ def ltpa(request): secret = utils.decode_secret(app_settings.TOKEN_SECRET) user = adapter.get_adapter().get_username(request) token = utils.generate_domino_ltpa_token(user, secret) - domain = app_settings.COOKIE_DOMAIN or request.META['HTTP_HOST'] + domain = app_settings.COOKIE_DOMAIN or request.META['HTTP_HOST'].split(':')[0] response.set_cookie(app_settings.COOKIE_NAME, token, domain=domain, httponly=app_settings.COOKIE_HTTP_ONLY) return response