Closed
Bug 268459
Opened 20 years ago
Closed 17 years ago
Search / filters for Message Body broken for quoted-printable bodies
Categories
(MailNews Core :: Search, defect)
MailNews Core
Search
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: marius.scurtescu, Assigned: Bienvenu)
References
Details
(Keywords: fixed1.8.1.2)
Attachments
(2 files, 1 obsolete file)
1.47 KB,
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
2.22 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 Build Identifier: version 0.9 (20041103) Searching messages bodies for plain text messages encoded using quoted-printable will not generate proper results, many messages will be missed. The cause seems to be the fact that a literal search is performed on the message body without first decoding the content. In quoted-printable lines are wrapped and the = sign is used to mark a continuation. If the string you are searching for happens to be split across two lines then it will not be found. Reproducible: Always Steps to Reproduce: 1. Identify some text message encoded using quoted-printable 2. Look for some string that is wrapped using = as a contonuation marker 3. Search for that string Actual Results: The message is not found Expected Results: It should be found Here is an example: ========================================================================== Subject: Production Errors Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_330_3090970.1099946048164" ------=_Part_330_3090970.1099946048164 Content-Type: text/plain; charset=Cp1252 Content-Transfer-Encoding: quoted-printable 2004-11-08 12:34:04,773 DEBUG [LanguageCache.getLanguage(Line 140)] Could n= ot find language for locale: en_US. Using language code en to find the lang= uage. ========================================================================== Searching for "Could not find language" or "find the language." will not produce this message.
Comment 1•20 years ago
|
||
Reproduced with TB version 0.9+ (20041112), and also Moz 1.8a5.
Assignee: mscott → sspitzer
Severity: major → normal
Status: UNCONFIRMED → NEW
Component: General → Search
Ever confirmed: true
Product: Thunderbird → MailNews
Summary: Search Messages broken for quoted-printable bodies → Search Message Body broken for quoted-printable bodies
Version: unspecified → Trunk
Updated•20 years ago
|
Product: Browser → Seamonkey
Message filters suffer same problem for me (mozilla 1.5 on Solaris2.8), such as (Body contains "=>") fails due to the wrapping issue but also because in quoted-printable an embedded "=" is "=3D". Sorry for some slightly off-topic digression here: Was hoping to find in bugzilla an answer to: Are there UNIX mail filters that can simply cleanse all incoming email, convert quoted-printable to 8-bit absolutely everywhere, even handling attachments)? I've heard of a few (sendmail) but that only do simple single-part email bodies, not multi-part or attachments, thus no use to me. Tempting to request mozilla-mail config option by which it will undo quoted-printable in all incoming emails. I realize this won't fly due to the desire to preserve the incoming emails as-is as much as possible. Likewise any notion of building such conversion into movemail (which I use, built-in) would not fly. But still permits option of a third-party "external" movemail to do so. However I anyway use also use procmail-based filters, also broken by quoted-printable same way as mozilla, thus I'd need a undo-quoted-printable filter that stands alone from mozilla.
Updated•19 years ago
|
Assignee: sspitzer → mail
Comment 3•19 years ago
|
||
*** Bug 293191 has been marked as a duplicate of this bug. ***
Comment 4•19 years ago
|
||
tbird has the same problem. cc'ing david / mscott.
Component: MailNews: Search → MailNews: Backend
Product: Mozilla Application Suite → Core
Updated•19 years ago
|
Summary: Search Message Body broken for quoted-printable bodies → Search / filters for Message Body broken for quoted-printable bodies
Similar to this bug, I found that if the Content-Transfer-Encoding is base64 then I also cannot search for plain text in the body of the message. Same problem for the message filters. It seems likely that spammers are using this to get around junk mail filtering. (It prevents me from filtering out email that has certain undesireable websites in it.) I am using Tbird 1.5 Am filing here so that a generic solution to different Content-Transfer-Encoding's can be implemented rather than just for quoted-printable. FYI, an additional complication on the email I am looking at is that charset="iso-2022-jp" but I tried searching and filtering on plain ascii text, so I doubt that this is the reason it didnt work. Just speculating here, but I wonder if spam filtering is able to see into these encoded body parts. Various reports of problems in spam identification, like bug #280716 and bug #284308 both have examples that contain quoted-printable body parts....
Comment 6•18 years ago
|
||
Bug 132340 is this same problem, but for base64 instead of q-p.
Assignee: mail → nobody
Component: MailNews: Backend → MailNews: Search
QA Contact: search
Assignee | ||
Comment 8•17 years ago
|
||
I believe search at least already goes through the quoted printable decoding; but we weren't dealing with soft line breaks correctly
Updated•17 years ago
|
Attachment #255226 -
Flags: superreview?(mscott) → superreview+
Comment 9•17 years ago
|
||
You're converting an '=' at the end of the line to a space? Is that correct? I thought that was an explicit indicator to concatenate without whitespace; if a space is desired, the line ends with '=20' or else has a space immediately before the '='.
Assignee | ||
Comment 10•17 years ago
|
||
Mike, you could be right - I'll need to find a test message...
Assignee | ||
Comment 11•17 years ago
|
||
thx, Mike - you were right as usual. This patch just eats the soft line break, leaving the space. I've tested this doing a quick search on mesasge body's in a folder looking for a string that spans a quoted printable soft line break and it seems to work fine.
Attachment #255226 -
Attachment is obsolete: true
Attachment #255241 -
Flags: superreview+
Assignee | ||
Comment 12•17 years ago
|
||
fixed on trunk and branch
Comment 13•17 years ago
|
||
TB 2b2-0217, this doesn't seem to be working for me. David, I sent you a test message which included these source lines: =========== Uw advertentie staat dan weer bovenaan in de rubriek! Bellers met een Pre= Pay telefoon of een pulse telefoon kunnen geen gebruik maken van deze die= nst. Belgische adverteerders bellen naar: 0903 - 42040. =========== Searching the folder for Body, contains, "prepay" (or "dienst") fails to find the message.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 14•17 years ago
|
||
Mike, I know you sent me that message, but I can't find it. Can you resend it? Thx!
Assignee | ||
Comment 15•17 years ago
|
||
Mike, never mind, it was in my junk folder.
Assignee | ||
Comment 16•17 years ago
|
||
Ugh, in the find case, we do decode the QP one line at a time, whereas in the preview text case (the other caller of this code, which now works), we pass in a block of text, including the line endings. So to fix this, I need to change nsMsgSearchTerm::MatchBody to coalesce quoted printable lines that end with '='.
Comment 17•17 years ago
|
||
Which again points to the MIME architecture. The q-p text should not be what's getting parsed -- C-T-E should be decoded before search ever gets it.
Assignee | ||
Comment 18•17 years ago
|
||
rewriting body search to go through the mime converter would certainly fix some issues - easy, it isn't.
Assignee | ||
Comment 19•17 years ago
|
||
concatenate lines with QP soft-linebreak before doing search.
Attachment #255828 -
Flags: superreview?(mscott)
Updated•17 years ago
|
Attachment #255828 -
Flags: superreview?(mscott) → superreview+
Assignee | ||
Comment 20•17 years ago
|
||
last patch landed on trunk and branch.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Comment 21•17 years ago
|
||
V with 2b2-0221, Win2K. Works in QuickSearch | Entire Message, too. Thanks, David.
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Attachment #255828 -
Attachment is patch: true
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•