6.0.0-RC7
6/27/26

[#1825] Patch for LDAP: DN does not allow special german characters
Summary Patch for LDAP: DN does not allow special german characters
Queue Turba
Queue Version 2.0
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester stefan+lists (at) luethje (dot) ch
Created 4/19/05 (7739 days ago)
Due
Updated 4/20/05 (7738 days ago)
Assigned 4/20/05 (7738 days ago)
Resolved 4/20/05 (7738 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
168 Jan Schneider Comment #3
State ⇒ Not A Bug
Reply to this comment
Beside that, it's a duplicate of bug 378 and bug 764. I agree with 
Chuck that this solution is questionable, you should discuss this on 
the mailing list with other LDAP experienced users, and add to ticket 
764 if you still think that needs to be fixed.
65 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
My understanding, somewhat second hand, is that this is *not* 
necessarily a good thing to do for LDAP, and not really supported by 
the spec and standards. Do you have evidence/knowledge to the contrary?
179 stefan+lists (at) luethje (dot) ch Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Patch for LDAP: DN does not allow special german characters
Queue ⇒ Turba
Reply to this comment
This patch converts also the DN string into character set:



--- ./turba/lib/Driver/ldap.php.save    2005-04-13 21:23:36.000000000 +0200

+++ ./turba/lib/Driver/ldap.php 2005-04-13 21:26:59.000000000 +0200

@@ -296,11 +296,11 @@

              String::lower($this->_makeKey($attributes)) != 
String::lower($object_id)) {

              if (isset($this->_params['dn']) && 
is_array($this->_params['dn']) && count($this->_params['dn'])) {

                  $pairs = array();

                  foreach ($this->_params['dn'] as $param) {

                      if (isset($attributes[$param])) {

-                        $pairs[] = array($param, $attributes[$param]);

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

                      }

                  }

                  $newrdn = $this->_quoteDN($pairs);

              } else {

                  return PEAR::raiseError(_("Missing DN in LDAP source 
configuration."));

@@ -368,11 +368,11 @@

      {

          $dn = '';

          if (is_array($this->_params['dn'])) {

              foreach ($this->_params['dn'] as $param) {

                  if (isset($attributes[$param])) {

-                    $dn .= $param . '=' . $attributes[$param] . ',';

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

                  }

              }

          }



          $dn .= $this->_params['root'];


Saved Queries