Empty FROM: header fails filter rule

RESOLVED FIXED

Status

defect
RESOLVED FIXED
16 years ago
5 years ago

People

(Reporter: selmer, Assigned: sspitzer)

Tracking

(Depends on 1 bug, {fixed-aviary1.0, fixed1.7})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

16 years ago
4/11 08 trunk build

I have a filter rule:
name="Blacklist"
enabled="yes"
type="1"
action="Move to folder"
actionValue="imap://selmer@nsmail-2.netscape.com/_Spam"
condition="AND (from,isn't in ab,moz-abmdbdirectory://abook.mab) AND (from,isn't
in ab,moz-abmdbdirectory://history.mab)"

I received an email with a blank FROM: header.

Rather than have that email filtered to the _Spam folder as expected, it found
its way into my inbox.  Some bug in the filter evaluation allowed a blank from
header to pass my AB test when it should not have.

Comment 1

16 years ago
-> Seth

My guess here is that nsresult nsMsgSearchTerm::MatchRfc822String is bailing
with FALSE because there are no addresses. I think it should make a special case
check for m_operator == nsMsgSearchOp::IsntInAB in the case that count == 0.
Assignee: naving → sspitzer

Comment 2

16 years ago
*** Bug 232388 has been marked as a duplicate of this bug. ***

Comment 3

16 years ago
Note that the duplicate shows that a From: line with just an empty mail address 
-- not completely blank -- will also pass the "in the address book" test.

And, as noted there, this means an easy bypass of the junk filter if the 
Whitelist-on-Addressbook feature is turned on, as most people have it.

Updated

16 years ago
OS: Windows 2000 → All
Hardware: PC → All

Comment 4

15 years ago
*** Bug 220877 has been marked as a duplicate of this bug. ***

Updated

15 years ago
Attachment #150542 - Attachment is obsolete: true

Comment 6

15 years ago
Why do mailservers accept incoming email without proper mail addresses?

I don't think this fix should go directly into the addressbook's code. Reason:
it is pretty valid to have empty address fields in an ab card and to search for
them. But it is nonsense in case of a "is in ab" filter rule.

Updated

15 years ago
Blocks: 66425

Comment 7

15 years ago
Are there any problems with the second patch?

Comment 8

15 years ago
Comment on attachment 150548 [details] [diff] [review]
do not allow "is (not) in ab" matches when sender's mail address is not specified

looks good to me.
Attachment #150548 - Flags: superreview+

Updated

15 years ago
Attachment #150548 - Flags: approval1.7.2?
Attachment #150548 - Flags: approval1.4.3?
Comment on attachment 150548 [details] [diff] [review]
do not allow "is (not) in ab" matches when sender's mail address is not specified

a=mkaply for 1.7.2. I see no reason to put this in 1.4.3 since 1.7 is the new
stable branch.
Attachment #150548 - Flags: approval1.7.2?
Attachment #150548 - Flags: approval1.7.2+
Attachment #150548 - Flags: approval1.4.3?
Attachment #150548 - Flags: approval1.4.3-

Comment 10

15 years ago
if I didn't check this into the trunk and 1.0 branch, I will...
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: fixed1.7
Resolution: --- → FIXED

Updated

15 years ago
Keywords: fixed-aviary1.0
patch has sr but not r  ??
Product: MailNews → Core
Product: Core → MailNews Core

Updated

5 years ago
Depends on: 391717
You need to log in before you can comment on or make changes to this bug.