[turba] addressbook problem with ldap and accented names (Invalid DN syntax)

Elan Ruusamäe glen at delfi.ee
Sun Jul 31 05:32:47 PDT 2005


hi

i've configured $cfgSources which is called 'personal_ldap' in sources.php.

the problem is that when i try to save addressbook entry that is not 7bit, 
then error is produced.

Failed to add an object: [34] "Invalid DN syntax" DN: 
cn=pläh,ou=glen,ou=Addressbooks,dc=myorg,dc=ee (attributes: [a:4:
{s:2:"cn";s:5:"pläh";s:2:"sn";s:3:"adf";s:3:"uid";s:50:"20050731151926.65r10l3kwkws at wintersunset.myorg.lan";s:11:"objectclass";a:4:
{i:0;s:3:"top";i:1;s:6:"person";i:2;s:13:"inetOrgPerson";i:3;s:20:"organizationalPerson";}}]).Charset:ISO-8859-1

however if i add the entry elsewhere (kaddressbook for example) then it 
displays data okay. and that elsewhere created .ldif export looks like this:

dn:: Y249cGzDpGgsIG91PWdsZW4sIG91PUFkZHJlc3Nib29rcywgZGM9bXlvcmcsZGM9ZWU=
uid: 9HDQfCYNtd
displayName:: cGzDpGg=
objectClass: top
objectClass: inetOrgPerson
sn:: cGzDpGg=
cn:: cGzDpGg=

i believe the error is because cn=pläh, because if i save it as cn=plah, it 
succeeds. so the ldap driver in horde/turba should encode the cn: to base64 
(and prefix with extra colon) before doing ldap query.

here's print_r($cfgSources['personal_ldap']);

Array
(
    [title] => My Addressbook
    [type] => ldap
    [params] => Array
        (
            [server] => ldap.myorg.lan
            [tls] => 
            [root] => ou=glen,ou=Addressbooks,dc=myorg,dc=ee
            [bind_dn] => cn=Manager,dc=myorg,dc=ee
            [bind_password] => XXX
            [dn] => Array
                (
                    [0] => cn
                )

            [objectclass] => Array
                (
                    [0] => top
                    [1] => person
                    [2] => inetOrgPerson
                    [3] => organizationalPerson
                )

            [scope] => one
            [charset] => utf-8
            [version] => 3
        )

    [map] => Array
        (
            [__key] => dn
            [__uid] => uid
            [name] => cn
            [email] => mail
            [lastname] => sn
            [title] => title
            [company] => organizationname
            [businessCategory] => businesscategory
            [workAddress] => postaladdress
            [workPostalCode] => postalcode
            [workPhone] => telephonenumber
            [fax] => facsimiletelephonenumber
            [homeAddress] => homepostaladdress
            [homePhone] => homephone
            [cellPhone] => mobile
            [notes] => description
            [office] => roomNumber
            [department] => ou
            [nickname] => displayName
            [website] => labeledURI
            [pgpPublicKey] => object_pgppublickey
            [smimePublicKey] => object_smimepublickey
        )

    [search] => Array
        (
            [0] => name
            [1] => email
            [2] => businessCategory
            [3] => title
            [4] => homePhone
            [5] => workPhone
            [6] => cellPhone
            [7] => homeAddress
        )

    [strict] => Array
        (
            [0] => dn
        )

    [export] => 1
    [browse] => 1
)


i've tested with varios turba versions, turba-2.0.2, turba-2.0.3-rc1, and 
finally 2005-07-31 snapshot.

--
glen


More information about the turba mailing list