[saml2] properly encode and decode attribute whether they are of str or unicode type
This commit is contained in:
parent
6269a8a886
commit
69517f28ef
|
@ -417,12 +417,12 @@ class RootDirectory(common.LassoDirectory):
|
|||
value = 'true'
|
||||
elif value is False:
|
||||
value = 'false'
|
||||
elif type(value) is unicode:
|
||||
value = value.encode('utf-8')
|
||||
elif type(value) is str:
|
||||
value = sitecharset2utf8(value)
|
||||
else:
|
||||
value = str(value)
|
||||
if type(value) is unicode:
|
||||
value = value.encode('utf-8')
|
||||
else:
|
||||
value = sitecharset2utf8(value)
|
||||
text_node = lasso.MiscTextNode.newWithString(value)
|
||||
text_node.textChild = True
|
||||
attribute_value = lasso.Saml2AttributeValue()
|
||||
|
|
Reference in New Issue