From 272cbf7338e12bd948ae2f8ebf825de75a967155 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Mon, 2 Feb 2015 15:44:54 +0100 Subject: [PATCH] boolean attributes convertered to unicode and lower-cased and the other converted to unicode Closes #6376 --- authentic2/saml/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authentic2/saml/models.py b/authentic2/saml/models.py index aac57a6..9bbb292 100644 --- a/authentic2/saml/models.py +++ b/authentic2/saml/models.py @@ -395,6 +395,10 @@ class SAMLAttribute(models.Model): atvs = [] for value in values: atv = lasso.Saml2AttributeValue() + if isinstance(value, bool): + value = unicode(value).lower() + else: + value = unicode(value) value = value.encode('utf-8') tn = lasso.MiscTextNode.newWithString(value) tn.textChild = True -- 2.1.4