<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Net_IMSP abook contacts with leading/trailing space in name break turba browsing</title> 
  <pubDate>Thu, 09 Apr 2026 22:37:19 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8533</link> 
  <atom:link rel="self" type="application/rss+xml" title="Net_IMSP abook contacts with leading/trailing space in name break turba browsing" href="https://bugs.horde.org/ticket/8533/rss" /> 
  <description>Net_IMSP abook contacts with leading/trailing space in name break turba browsing</description> 
 
   
   
  <item> 
   <title>Although Turba properly prevents address book contacts from </title> 
   <description>Although Turba properly prevents address book contacts from being created with names containing leading/trailing space, we have other IMSP clients on our network that lack this restriction. Any IMSP address book containing one of these contacts becomes unbrowseable in Turba, and the contacts don&#039;t show up during name expansion search in IMP.



I&#039;ve traced the problems we were having to two locations, the first is the receiveStringLiteral function in IMSP.php. It trims the received literal from fread. I don&#039;t think that makes sense. Seems like the literal value should be treated as such, including any extraneous space it may have. This was breaking searchaddress/fetchaddress coherence for UTF-8 contact names w/ leading or trailing whitespace.



The second is the search function in IMSP/Book.php.  Around line 250  it strips double quote characters, and then trims leading whitespace. Inverting the order of those two operations fixes contact names with leading whitespace. (Trim space on the left of the double quote, then remove the quote, rather than potentially catching leading spaces from the quoted string.) This was breaking contact search/fetch for contact names w/ leading whitespace.



Fixing those two locations in the code brings back browse capability &amp; name expansion, however, loading a detail or edit view in Turba for the contacts named with extraneous spaces is still broken (standard server NO response). The value&#039;s getting trimmed somewhere before being encoded in the view link. 



I consider my current fix &#039;adequate&#039;, or &#039;a start,&#039; but it would be nice if more of the Turba interface worked with these contacts.



Patch against HEAD for IMSP.php and Book.php provided.



Test environment: cyrus imspd server, php 5.2.x, apache 2.2.x</description> 
   <pubDate>Thu, 27 Aug 2009 23:38:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8533#t55565</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Don&#039;t trim w</title> 
   <description>Changes have been made in CVS for this ticket:

Don&#039;t trim ws from data rec&#039;d as a stream
Bug: 8533
Submitted by: noah (at) lsit (dot) ucsb (dot) edu
http://cvs.horde.org/diff.php/framework/Net_IMSP/IMSP.php?rt=horde&amp;r1=1.42&amp;r2=1.43&amp;ty=u
http://cvs.horde.org/diff.php/framework/Net_IMSP/IMSP/Book.php?rt=horde&amp;r1=1.48&amp;r2=1.49&amp;ty=u</description> 
   <pubDate>Thu, 01 Oct 2009 23:43:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8533#t56135</link> 
  </item> 
   
  <item> 
   <title>Committed and merged to FW_3, thanks!</title> 
   <description>Committed and merged to FW_3, thanks!</description> 
   <pubDate>Thu, 01 Oct 2009 23:45:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8533#t56136</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
