diff options
author | Johan Lundberg <lundberg@sunet.se> | 2022-12-09 11:38:15 +0100 |
---|---|---|
committer | Johan Lundberg <lundberg@sunet.se> | 2022-12-09 11:38:15 +0100 |
commit | 5bd9ec44e7fbfd7017ac9762b2e97d1e31db9368 (patch) | |
tree | 674fb6dd2fb38e3bf7bb3a7ec2c15293453614a1 | |
parent | bc8440650cafb9a7273c26f2489720f95cb89ada (diff) | |
download | pysaml2-5bd9ec44e7fbfd7017ac9762b2e97d1e31db9368.tar.gz |
do not add a duplicate attribute request for subject id
-rw-r--r-- | src/saml2/assertion.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saml2/assertion.py b/src/saml2/assertion.py index 4df0cf3c..46733f93 100644 --- a/src/saml2/assertion.py +++ b/src/saml2/assertion.py @@ -559,7 +559,7 @@ class Policy: required_attributes = spec.get("required", []) optional_attributes = spec.get("optional", []) required_subject_id = metadata_store.subject_id_requirement(sp_entity_id) if metadata_store else None - if required_subject_id: + if required_subject_id and required_subject_id not in required_attributes: required_attributes.append(required_subject_id) return self.filter( ava, |