Bug#1016185: slapd: Broken encoding of non-ASCII organization names
Gioele Barabucci
gioele at svario.it
Thu Jul 28 19:40:04 BST 2022
Package: slapd
Version: 2.5.12+dfsg-2
Tags: patch
The `postinst` maintscript of `slapd` incorrectly encodes organization
names with non-ASCII characters.
The issue is that values received from debconf (already in UTF-8) are
encoded once again via the function `encode_utf8`.
This turns
"pé" (0x70 0xC3 0xA9 = U+0070, U+00E9)
into
"pé" (0x70 0xC3 0x8e 0xC2 0xA9 = U+0070, U+00C3, U+00A9)
There are two possible scenarios:
1. If one assumes that the string returned by debconf is UTF-8 encoded
(that is the case in all modern setups), then there is no need for
another round of encoding.
2. If instead, one assumes that the string returned by debconf is not
UTF-8 encoded, then one should also know which encoding it is in, in
order to perform the right conversion.
The current code produces wrong results in both cases.
A patch to fix this problem can be found at
https://salsa.debian.org/openldap-team/openldap/-/merge_requests/6
Regards
--
Gioele Barabucci
More information about the Pkg-openldap-devel
mailing list