lists.arthurdejong.org
RSS feed

Re: Support for Base64 encoded values

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: Support for Base64 encoded values



On Fri, 2017-06-16 at 14:29 +0200, Michael Ströder wrote:
> The local system likely passes strings around as opaque buffers and
> does not care about character sets and their encoding at all. And
> then it coincidentally works for you.

You would then still run into normalisation issues I would expect.

> With an external user database (LDAP) you have an external system
> interface. In case of LDAP the character set to be used and its
> encoding is well-defined [1] but might differ from the system's
> locale.

Attached is a patch that implements unicode normalisation in all places
where either strings are passed to LDAP (in search filters) or when
making comparisons in nslcd.

This means that "jose\xcc\x81" should be turned into "jos\xc3\xa9"
before being passed to the LDAP server and both strings are considered
equal in nslcd.

Note that this patch is completely untested and requires libunistring
for the normalisatio to be done (it will fall back to byte comparison
if the library is unavailable or if it fails for some reason).

Feedback and testing on this patch is appreciated!

-- 
-- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --

Attachment: implement-utf-8-string-normalisation.patch
Description: Text Data

-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/nss-pam-ldapd-users/