Opened 13 years ago
Closed 12 years ago
#9218 closed defect (fixed)
[patch] Add unicode support
Reported by: | Owned by: | John Hampton | |
---|---|---|---|
Priority: | normal | Component: | DirectoryAuthPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
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 displayname
s which end up in the session_attribute
table and Japanese OU
s in some of the DN
s 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.
Attachments (2)
Change History (6)
Changed 13 years ago by
Attachment: | adauth-unicode.diff added |
---|
comment:1 Changed 13 years ago by
Sorry, forgot to mention that the patch is against trunk
and that the email
address is encoded for people use non-ASCII domain names now that these are available.
comment:2 Changed 13 years ago by
FTR, just by chance I noticed that we also have some Japanese sAMAccountName
s but fortunately none of them are of objectCategory
person
so adauth-unicode.diff works fine for me. In case you have non-ASCII sAMAccountName
s you may need additional changes.
comment:3 Changed 13 years ago by
Found one little oversight in adauth-unicode.diff. This may happen in the recursive calls to expand_group_users()
when you have member groups with non-ASCII DNs. Patch to the previous patch adauth-unicode-recursive-expand-group-users.diff.
Changed 13 years ago by
Attachment: | adauth-unicode-recursive-expand-group-users.diff added |
---|
Fix recursive expand_group_users()
Unicode patch for ActiveDirectoryAuthPlugin