[patch] Add unicode support
|Reported by:||olaf.meeuwissen@…||Owned by:||pacopablo|
There are two boundaries where ActiveDirectoryAuthPlugin is missing unicode support:
- passing configuration information to the Active Directory Server
- storing information from the Active Directory Server in the session_attribute table
In the first case the information is obtained through Trac and therefor in unicode. In the second case, the information is in whatever encoding the ADS uses and needs to be converted to unicode before passing it to the database connection.
Both issues were show stoppers for me because we have Japanese displaynames which end up in the session_attribute table and Japanese OUs in some of the DNs which are configured.
Attached is a patch that works for me (tested on Trac 0.12). I am not sure whether all ADSs use UTF-8 so I made it a configuration option just in case.