From af561e0e0bb7d18d65c229be89d10ff4aa3d9f9a Mon Sep 17 00:00:00 2001 From: Paul Marillonnet Date: Fri, 6 Oct 2017 18:13:36 +0200 Subject: [PATCH] LoginView: do not crash if an IdP doesn't have an ENTITY_ID field --- mellon/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mellon/views.py b/mellon/views.py index e01dc13..ae6a28f 100644 --- a/mellon/views.py +++ b/mellon/views.py @@ -342,7 +342,8 @@ class LoginView(ProfileMixin, LogMixin, View): if idp is None: return HttpResponseBadRequest('no idp found') self.profile = login = utils.create_login(request) - self.log.debug('authenticating to %r', idp['ENTITY_ID']) + self.log.debug('authenticating to %r', + idp.get('ENTITY_ID', 'undefined')) try: login.initAuthnRequest(idp['ENTITY_ID'], lasso.HTTP_METHOD_REDIRECT) authn_request = login.request -- 2.11.0