[turba] Error adding entry when dn has accents

Jean-Luc Wasmer jl+horde at wasmer.ca
Tue Sep 30 21:12:41 PDT 2003


Hi,

In function Turba_Driver_ldap::addObject (in lib/Driver/ldap.php) every
attribute is converted but dn.

$dn = $attributes['dn'];
at line 251 in CVS HEAD, could be replaced with:

$dn = String::convertCharset($attributes['dn'], NLS::getCharset(),
                             $this->_params['charset']);


this would be at line 287 in the stable release and replaced with:

$dn = utf8_encode($attributes['dn']);


The problem is that the calling function will not know about the modified
key (if the key is dn).

For instance, Turba_Source::addObject will return the unmodifed key that
will be used to create the new url:

    $url = Turba::addParameter($url, 'key=' . urlencode($key));

resulting in an invalid url (the page showing the new entry will be empty).

JL



More information about the turba mailing list