Summary | Net_IMSP abook contacts with leading/trailing space in name break turba browsing |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | noah (at) lsit (dot) ucsb (dot) edu |
Created | 08/27/2009 (5791 days ago) |
Due | |
Updated | 10/01/2009 (5756 days ago) |
Assigned | 08/28/2009 (5790 days ago) |
Resolved | 10/01/2009 (5756 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
State ⇒ Resolved
Don't trim ws from data rec'd as a stream
Bug: 8533Submitted by: noah (at) lsit (dot) ucsb (dot) edu
http://cvs.horde.org/diff.php/framework/Net_IMSP/IMSP.php?rt=horde&r1=1.42&r2=1.43&ty=u
http://cvs.horde.org/diff.php/framework/Net_IMSP/IMSP/Book.php?rt=horde&r1=1.48&r2=1.49&ty=u
Assigned to Michael Rubinsky
Priority ⇒ 1. Low
New Attachment: IMSP-fix-trims.patch
Patch ⇒ Yes
Milestone ⇒
Summary ⇒ Net_IMSP abook contacts with leading/trailing space in name break turba browsing
Type ⇒ Bug
State ⇒ Unconfirmed
Queue ⇒ Horde Framework Packages
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't show up during name expansion search in
IMP.
I'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'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 &
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's getting trimmed somewhere before
being encoded in the view link.
I consider my current fix 'adequate', or 'a start,' 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