[Tickets #8533] Net_IMSP abook contacts with leading/trailing space in name break turba browsing
bugs at horde.org
bugs at horde.org
Thu Aug 27 19:38:48 UTC 2009
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8533
------------------------------------------------------------------------------
Ticket | 8533
Created By | noah at lsit.ucsb.edu
Summary | Net_IMSP abook contacts with leading/trailing space in
| name break turba browsing
Queue | Horde Framework Packages
Version | HEAD
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch | 1
Owners |
+New Attachment | IMSP-fix-trims.patch
------------------------------------------------------------------------------
noah at lsit.ucsb.edu (2009-08-27 19:38) wrote:
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'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
More information about the bugs
mailing list