Summary | Possible format failure in dn (export in ldif) |
Queue | Turba |
Queue Version | 2.2-RC3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | selsky (at) columbia (dot) edu |
Requester | herbert (at) linuxhacker (dot) at |
Created | 03/22/2008 (6352 days ago) |
Due | |
Updated | 03/23/2008 (6351 days ago) |
Assigned | 03/22/2008 (6352 days ago) |
Resolved | 03/23/2008 (6351 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Matt Selsky
State ⇒ Resolved
There were a few problems with that patch. Try this instead:
http://lists.horde.org/archives/cvs/Week-of-Mon-20080317/076541.html
My fix will be in Turba 2.2rc4.
State ⇒ Feedback
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ Possible format failure in dn (export in ldif)
Type ⇒ Bug
State ⇒ Unconfirmed
dn: cn=SGVyYmVydCBNw7xzdGVybWFubg==,mail=herbert@linuxhacker.at
I think, it should be:
dn:: Y249SGVyYmVydCBNw7xzdGVybWFubmhlcmJlcnRAbGludXhoYWNrZXIuYXQ=
This patch works for me:
--- lib/Data/ldif.php.orig1 2008-03-22 13:24:49.000000000 +0100
+++ lib/Data/ldif.php 2008-03-22 13:55:50.000000000 +0100
@@ -192,26 +192,20 @@
// Store cn and mail separately for use in record dn
if
(!$this->_is_safe_string($row[$mozillaTurbaMap[$value]])) {
$recordData .= $value . ':: ' .
base64_encode($row[$mozillaTurbaMap[$value]]) ."\n";
- if ($value == 'cn') {
- $recordCn =
base64_encode($row[$mozillaTurbaMap[$value]]);
- }
- if ($value == 'mail') {
- $recordMail =
base64_encode($row[$mozillaTurbaMap[$value]]);
- }
} else {
$recordData .= $value . ': ' .
$row[$mozillaTurbaMap[$value]] ."\n";
- if ($value == 'cn') {
- $recordCn = $row[$mozillaTurbaMap[$value]];
- }
- if ($value == 'mail') {
- $recordMail = $row[$mozillaTurbaMap[$value]];
- }
}
}
}
- $export .= 'dn: cn=' . $recordCn . ',mail=' . $recordMail . "\n"
- . "objectclass: top\n"
+ $dn = 'cn=' . $row[$mozillaTurbaMap['cn']] .
$row[$mozillaTurbaMap['mail']];
+ if (!($this->_is_safe_string($row[$mozillaTurbaMap['cn']]) &&
+ $this->_is_safe_string($row[$mozillaTurbaMap['cn']]))) {
+ $export .= 'dn:: ' . base64_encode($dn) . "\n";
+ } else {
+ $export .= 'dn: ' . $dn . "\n";
+ }
+ $export .= "objectclass: top\n"
. "objectclass: person\n"
. "objectclass: organizationalPerson\n"
. "objectclass: inetOrgPerson\n"