1704
|
|
|
Karl Williams |
4 years ago
|
|
|
1703
|
|
|
Karl Williams |
4 years ago
|
|
|
1702
|
|
|
Karl Williams |
4 years ago
|
|
|
1701
|
|
|
Maximiliano Bertacch... |
4 years ago
|
|
|
1700
|
|
|
Karl Williams |
4 years ago
|
|
|
1699
|
|
|
Maximiliano Bertacch... |
4 years ago
|
|
|
1698
|
|
|
Maximiliano Bertacch... |
4 years ago
|
|
|
1697
|
|
|
Maximiliano Bertacch... |
4 years ago
|
|
|
1696
|
|
|
Daniel Manrique |
4 years ago
|
|
|
1695
|
|
|
Daniel Manrique |
4 years ago
|
|
|
1694
|
|
|
Maximiliano Bertacch... |
4 years ago
|
|
|
1693
|
|
|
Matias Bordese |
4 years ago
|
|
|
1692
|
|
|
Daniel Manrique |
4 years ago
|
|
|
1691
|
|
|
Guillermo Gonzalez |
4 years ago
|
|
|
1690
|
|
|
Guillermo Gonzalez |
4 years ago
|
|
|
1689
|
|
|
Daniel Manrique |
4 years ago
|
|
|
1688
|
|
|
Celso Providelo |
4 years ago
|
|
|
1687
|
|
|
Po-Hsu Lin |
4 years ago
|
|
|
1686
|
|
|
Celso Providelo |
5 years ago
|
|
|
1685
|
|
SAML: Ensure all dicts used to build assertions contain only utf-8-encoded data.
The SAML library we use assumes use only of ascii inputs and parameters and Python 2 str <-> unicode implicit conversion intricacies. Some of those assumptions are broken by SSO's use of the library and particularly the CanonicalProcessor, which gets a lot of those assertion parameters and attributes from the database; SP config parameters, custom attributes come from Django ORM and are thus unicode, and since the SAML library doesn't do explicit unicode data encoding, it barfs when implicit conversions for unicode data that contains non-ascii characters are attempted, particularly when using the python string.Template classes and base64-encoding the final assertion;these behave predictably badly when given a str template and fed unicode substitution values.
Since the output is expected to be utf8-encoded XML, this MP just ensures all the pieces used by the library to assemble, sign and encode the assertion are sent as utf8-encoded strs rather than unicodes.
This problem was only exposed when we added a new "full name" substitution for SAML attributes: up until now, by some fluke, all the date we fed to the SAML library was ascii-only and so even when we were sending mixed strs and unicodes back and forth, implicit conversion of unicode to str worked fine and the problem went undetected. However, fullnames, unlike URLs and other identifiers, usernames and OpenIDs, understandably can contain non-ascii characters.
Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/saml-unicode/+merge/365615
|
Daniel Manrique |
5 years ago
|
|
|