Fix encoding issues with LDAP/AD on Python 3.x
Review Request #11424 — Created Feb. 1, 2021 and submitted
A user reported encoding errors in their logs when attempting to log in
a new user when connected to LDAP. The issue here was that data returned
from ldap wasbytes
, but we were attempting to split it using a
unicode
splitter. According to the ldap documentation, field names are
returned as the text type, but attribute values will be bytestrings. The
documentation is a unclear in that it also claims that "text values"
will be the unicode type. In order to accomodate potentially different
behavior across Python versions, all values have been wrapped in
force_text
. The unit tests have been updated to supply the expected
(bytes) types for values.
Ran unit tests on Python 2.7 and 3.8.
Summary | ID |
---|---|
5496def4229b4f5a30cb0dba00325a044ff2be03 |
Description | From | Last Updated |
---|---|---|
Swap these (alphabetical order). |
chipx86 |