Skip to content

Commit 5bd9ec4

Browse files
committed
do not add a duplicate attribute request for subject id
1 parent bc84406 commit 5bd9ec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/saml2/assertion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def restrict(self, ava, sp_entity_id, metadata=None):
559559
required_attributes = spec.get("required", [])
560560
optional_attributes = spec.get("optional", [])
561561
required_subject_id = metadata_store.subject_id_requirement(sp_entity_id) if metadata_store else None
562-
if required_subject_id:
562+
if required_subject_id and required_subject_id not in required_attributes:
563563
required_attributes.append(required_subject_id)
564564
return self.filter(
565565
ava,

0 commit comments

Comments
 (0)