From 3e2458170f4e01eb4d51453cc642f7f96ed4d1c0 Mon Sep 17 00:00:00 2001 From: MiguelSR Date: Fri, 1 Apr 2016 10:23:12 +0200 Subject: [PATCH] Added condition to prevent crash when _sp_authn_requests_signed isn't set --- djangosaml2/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangosaml2/views.py b/djangosaml2/views.py index a2a2fad3..c43212a4 100644 --- a/djangosaml2/views.py +++ b/djangosaml2/views.py @@ -145,7 +145,7 @@ def login(request, # # Read more in the official SAML2 specs (3.4.4.1): # http://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf - binding = BINDING_HTTP_POST if conf._sp_authn_requests_signed else BINDING_HTTP_REDIRECT + binding = BINDING_HTTP_POST if getattr(conf, '_sp_authn_requests_signed', False) else BINDING_HTTP_REDIRECT client = Saml2Client(conf) try: