Closed Bug 202169 Opened 21 years ago Closed 20 years ago

Empty FROM: header fails filter rule

Categories

(MailNews Core :: Filters, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: selmer, Assigned: sspitzer)

References

(Depends on 1 open bug)

Details

(Keywords: fixed-aviary1.0, fixed1.7)

Attachments

(1 file, 1 obsolete file)

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.
-> 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
*** Bug 232388 has been marked as a duplicate of this bug. ***
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.
OS: Windows 2000 → All
Hardware: PC → All
*** Bug 220877 has been marked as a duplicate of this bug. ***
Attachment #150542 - Attachment is obsolete: true
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.
Blocks: 66425
Are there any problems with the second patch?
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+
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-
if I didn't check this into the trunk and 1.0 branch, I will...
Status: NEW → RESOLVED
Closed: 20 years ago
Keywords: fixed1.7
Resolution: --- → FIXED
Keywords: fixed-aviary1.0
patch has sr but not r  ??
Product: MailNews → Core
Product: Core → MailNews Core
Depends on: 391717
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: