summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahyar Moghimi <mahyar.moghimi@netgo.de>2022-12-14 11:20:04 +0100
committerIvan Kanakarakis <ivan.kanak@gmail.com>2023-02-14 20:20:38 +0200
commitb925bae1adafb331ed42aad50111546796461a93 (patch)
tree0c96eaa0bc5260eb842d83ae0d36968bafd1a149
parent67ee33285a6d38a93a44170392914ab9f114d3a7 (diff)
downloadpysaml2-b925bae1adafb331ed42aad50111546796461a93.tar.gz
With encryption The ID of each Signature element must be unique
If assertion is gonna be encrypted and the response and the assertion are signed, both signatures will have an ID of `signature1` which leads to an invalid xml because the ids have to be unique. A similar issue has been reported and fixed the same way in server.py with this commit: 4375361939e942c4dd666d3ca4e1159858404bc4
-rw-r--r--src/saml2/entity.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py
index f167a08a..1e36e651 100644
--- a/src/saml2/entity.py
+++ b/src/saml2/entity.py
@@ -874,7 +874,7 @@ class Entity(HTTPBase):
_assertion.signature = pre_signature_part(
_assertion.id,
self.sec.my_cert,
- 1,
+ 2,
sign_alg=sign_alg,
digest_alg=digest_alg,
)