[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5497) back-sql with base64 encoded attributes

Full_Name: Pavel Kislinger
Version: 2.4.8
OS: Freebsd 6.3 Stable
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

I am using this packages:


I have records with diacritics (czech language) like name or surname in SQL.
| vutid | name          | surname   |
|     1 | Pavel         | Kislinger |
|     2 | Michhě?čř?ýíé | ?abáček   |

First record in SQL correspond to record in LDAP. Second record with diacritics
doesn't works.

# 1, users, test.vutbr.cz
dn: uid=1,ou=users,dc=test,dc=vutbr,dc=cz
objectClass: usi
cn: Pavel Kislinger
sn: Kislinger
givenName: Pavel
uid: 1

Solution of this problem is base64 encoding of attributes.
"cn" for second record "Michhě?čř?ýíé ?abáček" could be:
cn:: eHhNaWNoaOy56Pi+/e3pYWx4eCBLaXNsaW5nZXI=

I wrote MySQL function base64_encoding and adjusted table ldap_attr_mapping for

insert into ldap_attr_mappings (<list of columns>) values

the result in ldap is:
cn: eHhNaWNoaOy56Pi+/e3pYWx4eCBLaXNsaW5nZXI=

This value is false recognized by ldap clients (outlook, thunderbird) as string
"eHhN..." instead of "Michh&#283;?&#269;&#345;?ýíé ?abá&#269;ek"

How can I mark "cn" attribute in SQL, that this attribute is encoded by base64?