Commit 3e8389e9 by Bach Dániel

common: fix AssertionError in Saml2Backend

parent b4764068
...@@ -38,6 +38,8 @@ class Saml2Backend(Saml2BackendBase): ...@@ -38,6 +38,8 @@ class Saml2Backend(Saml2BackendBase):
match = match.group() match = match.group()
return '+%04x' % ord(match) return '+%04x' % ord(match)
if isinstance(main_attribute, str):
main_attribute = main_attribute.decode('UTF-8')
assert isinstance(main_attribute, unicode) assert isinstance(main_attribute, unicode)
return re.sub(r'[^\w.@-]', replace, main_attribute) return re.sub(r'[^\w.@-]', replace, main_attribute)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment