Skip to content

Commit 2daaaa0

Browse files
Merge pull request #102 from skoranda/empty_name_format
Fix for no Format in NameIDPolicy for SAML2 frontend
2 parents a07c602 + 672a29f commit 2daaaa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/satosa/frontends/saml2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _handle_authn_request(self, context, binding_in, idp):
188188
context.state[self.name] = self._create_state_data(context, idp.response_args(authn_req),
189189
context.request.get("RelayState"))
190190

191-
if authn_req.name_id_policy:
191+
if authn_req.name_id_policy and authn_req.name_id_policy.format:
192192
name_format = saml_name_id_format_to_hash_type(authn_req.name_id_policy.format)
193193
else:
194194
# default to name id format from metadata, or just transient name id

0 commit comments

Comments
 (0)