Open Bug 1034408 Opened 10 years ago Updated 2 years ago

Blank field in message filters matches ALL messages

Categories

(MailNews Core :: Filters, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: cn.white, Unassigned)

Details

Attachments

(1 file)

Attached image thunderbirdbug.png
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140608211622

Steps to reproduce:

Accidently added a blank logic rule to a filter, that was set to "match any of the following".


Actual results:

It matched every message in the selected folder.


Expected results:

It should have matched no messages.
Well, that is questionable:) Is there an zero-length string at the end of each From-address string? Theoretically there is :) So the TB filters backend is correct.
But we could probably warn the user in the frontend (the UI you attached) about empty fields. We already have a mechanism for that that warns if the actions will be executed reordered.

Paenglab, mkmelin, what do you think here? Should we show a warning here? Should it be below the rules field? Or on to bottom after actions (the current info bar appears there). Or should we highlight the suspicious row in rules with some background (but then there would be no text). Other options?
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(richard.marti)
Flags: needinfo?(mkmelin+mozilla)
OS: Linux → All
Product: Thunderbird → MailNews Core
Hardware: x86_64 → All
Of course maybe there is a situation where we want such an empty rule. Like to say "If whole From really is empty". But then the user would use the "is" operator, not "contains" or "ends with".
It shouldn't be allowed, but I don't know what the best way to prohibit it would be. Maybe you just alert the user and refuse to save if something like that happens.
Flags: needinfo?(mkmelin+mozilla)
A empty field shouldn't be allowed because it's not clear if it means nothing matches or all matches. I think something like "" for a empty string should be needed.

And if the user want to save a empty field it should be alerted.
Flags: needinfo?(richard.marti)
I think it depends on the operator (is, isn't, contains, ends, etc.) whether an empty string is useful or not.

I asked on the UI how to convey the message to the user. I would NOT block it completely from saving (we may miss some case). But I would like to just notify the user (as we do for the action reordering). Can anybody propose the UI for that? I gave some options in comment 1.
The info bar and highlighting the row would be good. Then the user knows directly which row is suspicious.

Aceman, please can you attach a screenshot with this info bar?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: