Summary | Ldap driver does not encode the DN to charset |
Queue | Turba |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | Horde Developers (at) |
Requester | brendan.bank (at) imap4all (dot) com |
Created | 11/04/2004 (7569 days ago) |
Due | |
Updated | 12/19/2004 (7524 days ago) |
Assigned | 11/15/2004 (7558 days ago) |
Resolved | 12/19/2004 (7524 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
values in making up your DN (apparently this is generally a bad idea),
or, learn the necessary amount of LDAP internals to come up with a
complete patch for this. Resolving this ticket.
State ⇒ Assigned
patch you've provided doesn't work at all - did you try to modify the
contact after creating? It won't find it.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Ldap driver does not encode the DN to charset
Queue ⇒ Turba
When you add ldap entries to an ldap database the DN is not converted
to the correct character set. (if charset is configured).
If a DN contains the common name (cn) cn=Cañigueral Bagóa,ou=addressbook...
This should be converted to cn=Albert Cañigueral Bagó,ou=addressbook...
The current code does not do this and I've patched the LDAP driver to do this:
===================================================================
RCS file: ./turba/lib/Driver/ldap.php,v
retrieving revision 1.1
diff -C 4 -r1.1 ./turba/lib/Driver/ldap.php
*** ./turba/lib/Driver/ldap.php 2004/11/04 13:56:38 1.1
--- ./turba/lib/Driver/ldap.php 2004/11/04 14:19:29
***************
*** 5,13 ****
* $Horde: turba/lib/Driver/ldap.php,v 1.53 2004/09/18 22:57:32
mdjukic Exp $
*
* @author Chuck Hagenbuch <chuck@horde.org>
* @author Jon Parise <jon@csh.rit.edu>
! * @version $Revision: 1.1 $
* @since Turba 0.0.1
* @package Turba
*/
class Turba_Driver_ldap extends Turba_Driver {
--- 5,13 ----
* $Horde: turba/lib/Driver/ldap.php,v 1.53 2004/09/18 22:57:32
mdjukic Exp $
*
* @author Chuck Hagenbuch <chuck@horde.org>
* @author Jon Parise <jon@csh.rit.edu>
! * @version $Revision: 1.2 $
* @since Turba 0.0.1
* @package Turba
*/
class Turba_Driver_ldap extends Turba_Driver {
***************
*** 293,300 ****
--- 293,301 ----
$newrdn .= $param . '=' . $attributes[$param] . ',';
}
}
$newrdn = substr($newrdn, 0, -1);
+ $newrdn = String::convertCharset($newrdn,
NLS::getCharset(), $this->_params['charset']);
} else {
return PEAR::raiseError(_("Missing DN in LDAP
source configuration."));
}
***************
*** 366,373 ****
--- 367,375 ----
}
}
$dn .= $this->_params['root'];
+ $dn = String::convertCharset($dn, NLS::getCharset(),
$this->_params['charset']);
return $dn;
}
/**