Summary: | IMAP quick search using non-ASCII characters creates an infinite loop | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Claws Mail (GTK 2) | Reporter: | George <removed-gdpr> | ||||||
Component: | QuickSearch | Assignee: | users | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | normal | CC: | simon.legner | ||||||
Priority: | P3 | ||||||||
Version: | 3.16.0 | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
With a search like: message matchcase "some@thing.com" when the "some@thing.com" is part of some message's headers the problems seems not to appear. I can confirm this, but only on Gmail, and only if the searched string contains non-ASCII characters. Libetpan adds the "CHARSET UTF-8" parameter to the UID SEARCH command, which Gmail's IMAP implementation apparently does not support, and this error case apparently is not handled in Claws Mail, as it should error out instead of diving into an endless loop. For now, you can get out of the loop by hitting Ctrl+W twice to toggle offline mode. That should make Claws snap out of it. Created attachment 1857 [details]
Handle IMAP search failure instead of ignoring it
Attached patch makes Claws Mail error out on protocol error during search, disconnect the IMAP session, and display an error dialog about it.
Thanks Andrej! Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2018-03-15 20:35:05.470526677 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=9af9b6b567dc2b2e16fec0566807666724836b2a Merge: 8f860bf 2d03eb9 Author: Colin Leroy <colin@colino.net> Date: Thu Mar 15 20:35:04 2018 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=2d03eb98268e11b12c698bb6f98c7fb2f3559e3b Author: Andrej Kacian <ticho@claws-mail.org> Date: Wed Mar 14 21:35:05 2018 +0100 Handle IMAP search failure instead of ignoring it. Error out on protocol error during search, disconnect the IMAP session, and display an error dialog about it. Closes bug 3986 - IMAP quick search using non-ASCII characters creates an infinite loop Thanks for the report, the fix will be in next release. |
Created attachment 1856 [details] network log STR: 1. Open an IMAP folder containing some subfolders 2. Run an Extended quick search with "Recursive" box checked for a phrase in 'whole message' or 'body part', e.g. body_part matchcase "something" EXPECTED: Messages should be found ACTUAL: Waiting forever without finding any messages. Looking at network log (attached) shows errors. The only way to stop this is to kill claws-mail process.