Use list addition instead of .append() for to_sign
The signing code expects a flattened list of tuples, not a list
which contains a list of tuples. For example, in my case I had:
to_sign = [('urn:oasis:names:tc:SAML:2.0:assertion:Assertion', 'id-2d44a290a77c9fe7b50899eea96aa183'), [('urn:oasis:names:tc:SAML:2.0:protocol:Response', 'id-7416bafb9df777c1c1151b6f1ce471bb')]]
Fixes:
File "/usr/local/lib/python2.7/dist-packages/pysaml2-1.0.2-py2.7.egg/saml2/ent
ity.py", line 458, in _response
return self.sign(response, to_sign=to_sign)
File "/usr/local/lib/python2.7/dist-packages/pysaml2-1.0.2-py2.7.egg/saml2/ent
ity.py", line 347, in sign
return signed_instance_factory(msg, self.sec, to_sign)
File "/usr/local/lib/python2.7/dist-packages/pysaml2-1.0.2-py2.7.egg/saml2/sig
ver.py", line 264, in signed_instance_factory
for (node_name, nodeid) in elements_to_sign:
ValueError: need more than 1 value to unpack
This commit is contained in:
@@ -339,7 +339,7 @@ class Entity(HTTPBase):
|
||||
mid = msg.id
|
||||
|
||||
try:
|
||||
to_sign.append([(class_name(msg), mid)])
|
||||
to_sign += [(class_name(msg), mid)]
|
||||
except AttributeError:
|
||||
to_sign = [(class_name(msg), mid)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user