Skip to content

Commit

Permalink
Added condition to prevent crash when _sp_authn_requests_signed isn't…
Browse files Browse the repository at this point in the history
… set
  • Loading branch information
MiguelSR committed Apr 4, 2016
1 parent 040a616 commit 3e24581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangosaml2/views.py
Expand Up @@ -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:
Expand Down

0 comments on commit 3e24581

Please sign in to comment.