Skip to content

Commit 4375361

Browse files
committed
The ID of each Signature element must be unique
If the assertion and response both are signed, both Signatures have an ID of `Signature1`. This creates invalid xml as xs:ID must be unique. This fixes the issue when integrating with onelogin's python3-saml client: Element '{http://www.w3.org/2000/09/xmldsig#}Signature', attribute 'Id': 'Signature1' is not a valid value of the atomic type 'xs:ID'.
1 parent 05d9276 commit 4375361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/saml2/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def _authn_response(self, in_response_to, consumer_url,
476476
if not encrypt_assertion:
477477
if sign_assertion:
478478
assertion.signature = pre_signature_part(assertion.id,
479-
self.sec.my_cert, 1,
479+
self.sec.my_cert, 2,
480480
sign_alg=sign_alg,
481481
digest_alg=digest_alg)
482482
to_sign.append((class_name(assertion), assertion.id))

0 commit comments

Comments
 (0)