6.0.0-beta1
7/11/25

[#1146] doesn't properly quote
Summary doesn't properly quote
Queue Turba
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester ldillon (at) sk-tech (dot) com
Created 01/13/2005 (7484 days ago)
Due
Updated 02/09/2005 (7457 days ago)
Assigned 01/15/2005 (7482 days ago)
Resolved 02/07/2005 (7459 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/09/2005 03:40:36 AM Chuck Hagenbuch Comment #4 Reply to this comment
Merged.
02/07/2005 10:38:14 AM Jan Schneider Comment #3
State ⇒ Resolved
Reply to this comment
No feedback. I'd say, merge it.
01/15/2005 08:31:57 PM Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Feedback
Reply to this comment
Please test the following patch which implements RFC 1485 quoting of 
DNs in the LDAP driver, which should cover the case you found plus a 
bunch of others that we weren't properly catching before:



http://cvs.horde.org/diff.php/turba/lib/Driver/ldap.php?r1=1.56&r2=1.57&ty=u



If this works for you, I'll merge it into the next stable Turba release.
01/13/2005 02:38:04 PM ldillon (at) sk-tech (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ doesn't properly quote
Queue ⇒ Turba
Reply to this comment
If the entry has a comma in it (for example, lastname, firstname), it 
doesn't properly quote the string.  The following fixes this:







--- /tmp/ldap.php.org        2005-01-13 08:37:13.727402078 -0600

+++ ldap.php        2005-01-13 08:31:39.689948716 -0600

@@ -290,7 +290,11 @@

                  $newrdn = '';

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

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

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

+                        if (strpos($attributes[$param],',') === false) {

+                            $newrdn .= $param . '=' . 
$attributes[$param] . ',';

+                        } else {

+                            $newrdn .= $param . '="' . $attributes[$param] . '",';

+                        }

                      }

                  }

                  $newrdn = substr($newrdn, 0, -1);


Saved Queries