Bug 674263 - message search with non-ascii or non-UTF8 string fails
Summary: message search with non-ascii or non-UTF8 string fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dovecot
Version: 4.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Hlavinka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-01 08:53 UTC by Takashi Sato
Modified: 2018-11-14 14:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-08 14:56:58 UTC
Target Upstream Version:


Attachments (Terms of Use)
patch for dovecot-0.99.11-9 (RHEL 4.8) (545 bytes, patch)
2011-02-01 08:53 UTC, Takashi Sato
no flags Details | Diff

Description Takashi Sato 2011-02-01 08:53:02 UTC
Created attachment 476333 [details]
patch for dovecot-0.99.11-9 (RHEL 4.8)

Description of problem:

searching message for dovecot with non-ascii or non-UTF8 string fails.

Version-Release number of selected component (if applicable):

- Red Hat Enterprise Linux 4
- dovecot-0.99.11

How reproducible:

Always with iso-2022-jp

Steps to Reproduce:

# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK dovecot ready.
01 login testuser redhat
01 OK Logged in.
02 examine inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 3 EXISTS
* 2 RECENT
* OK [UIDVALIDITY 1296113318] UIDs valid
* OK [UIDNEXT 11] Predicted next UID
02 OK [READ-ONLY] Select completed.
03 fetch 1:3 (uid)
* 1 FETCH (UID 8)
* 2 FETCH (UID 9)
* 3 FETCH (UID 10)
03 OK Fetch completed.
04 uid search charset iso-2022-jp uid 8:10 (text "^[$B$F$9$H^[(B")

Connection closed by foreign host.

Actual results:

imap aborted with segfault.
Or, no search results return.

Expected results:

Search succeeds as follows.

04 uid search charset iso-2022-jp uid 8:10 (text "^[$B$F$9$H^[(B")
* SEARCH 10
04 OK Search completed.


Additional info:

The reason why iconv fails is that UTF-8 encoded string is treated as iso-2022-jp string.

While searching messages, charset_to_ucase_utf8_string() is called twice.
At first time, passed character string is encoded with iso-2022-jp. 
At second time, it's encoded with UTF-8.

I attached patch for dovecot-0.99.11-9 (RHEL 4.8).

Comment 1 Michal Hlavinka 2011-02-08 14:56:58 UTC
I'm sorry for not addressing the issue in RHEL-4. As dovecot was not scheduled for update in RHEL-4.9, which is last regular update release,  I'm closing this bugzilla WONTFIX. If you are still experiencing the issue with RHEL-5 or RHEL-6, feel free to reopen it against RHEL-5 or RHEL-6 respectively.


Note You need to log in before you can comment on or make changes to this bug.