From fd409d6d3c1ba0085ddc0bd6a981fee457d85248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 22 Sep 2019 12:30:41 +0200 Subject: [PATCH] backends: accept being called with None as saml_attributes (#36330) --- mellon/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mellon/backends.py b/mellon/backends.py index 309ffb6..0e4726b 100644 --- a/mellon/backends.py +++ b/mellon/backends.py @@ -22,7 +22,7 @@ from . import utils class SAMLBackend(ModelBackend): def authenticate(self, request=None, **credentials): - saml_attributes = credentials.get('saml_attributes') + saml_attributes = credentials.get('saml_attributes') or {} # without an issuer we can do nothing if 'issuer' not in saml_attributes: return