6.0.0-beta1
7/4/25

[#5979] (whitespace-)trimming of mapped attributes
Summary (whitespace-)trimming of mapped attributes
Queue Turba
Queue Version 2.2-RC1
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester xk3 (at) mompl (dot) org
Created 12/09/2007 (6417 days ago)
Due
Updated 12/14/2007 (6412 days ago)
Assigned
Resolved 12/14/2007 (6412 days ago)
Milestone
Patch No

History
12/14/2007 08:18:21 PM Chuck Hagenbuch Assigned to Jan Schneider
State ⇒ Resolved
 
12/14/2007 08:13:21 PM xk3 (at) mompl (dot) org Comment #5 Reply to this comment
yes, works

Thanks!
12/14/2007 01:13:49 AM Jan Schneider Comment #4 Reply to this comment
12/11/2007 05:59:28 PM xk3 (at) mompl (dot) org Comment #3 Reply to this comment
horde-FRAMEWORK_3-2007-12-11

horde-HEAD-2007-12-11

turba-HEAD-2007-12-11



$attributes just before adding to LDAP at 
horde/turba/lib/Driver/ldap.php:266 error_log and print_r for new 
contact with only lastname (and email)

Array

(

     [DUFFtype] => Object

     [cn] =>  Lastname         <-- " Lastname" with leading space

     [sn] => Lastname

     [mail] => xxx@a.com

[SNIP]



ldapsearch results in:

cn:: IExhc3RuYW1l     <-- " Lastname" with leading space (base64)

sn: Lastname


12/10/2007 11:07:38 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This happens already. Where exactly do you see this *not* happening? 
And in case this has been implemented after RC1, did you try a recent 
snaphot?
12/09/2007 02:11:17 PM xk3 (at) mompl (dot) org Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ (whitespace-)trimming of mapped attributes
Queue ⇒ Turba
State ⇒ New
Reply to this comment
Mapping attributes from multiple hash values can generate hideous 
results if some of the attributes are not set. Example:



'name' => array('fields' => array('firstname', 'lastname'),

                           'format' => '%s %s',

                           'attribute' => 'cn'),



If firstname is not set, cn becomes " Lastname"  with a leading space.



Would be nice if mapped attributes get trimmed afterwards, maybe even 
on multiple whitespaces within the string. Yes, there cannot be a 
general trim rule, but maybe another map parameter just for the 
(common?) whitespace separation?

Saved Queries