summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@sunet.se>2022-12-09 11:38:15 +0100
committerJohan Lundberg <lundberg@sunet.se>2022-12-09 11:38:15 +0100
commit5bd9ec44e7fbfd7017ac9762b2e97d1e31db9368 (patch)
tree674fb6dd2fb38e3bf7bb3a7ec2c15293453614a1
parentbc8440650cafb9a7273c26f2489720f95cb89ada (diff)
downloadpysaml2-5bd9ec44e7fbfd7017ac9762b2e97d1e31db9368.tar.gz
do not add a duplicate attribute request for subject id
-rw-r--r--src/saml2/assertion.py2
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,