Closed Bug 256314 Opened 16 years ago Closed 16 years ago
Wrong identity chosen when address contains +
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Build Identifier: version 0.7 (20040616) I have a single account with half a dozen identities. Generally when I reply to a message Thunderbird is smart and picks the right identity to reply from. However Thunderbird always fails to pick the right identity when the address involved contains a + Reproducible: Always Steps to Reproduce: 1. Create identity firstname.lastname@example.org 2. Receive message addressed to email@example.com 3. Reply to message. Actual Results: From: is incorrectly set to the default identity for the account. Expected Results: Desired behavior is to have firstname.lastname@example.org chosen for the From:. Note that the following works just fine: 1. Create identity email@example.com 2. Receive message addressed to firstname.lastname@example.org 3. Reply to message. 4. From: is correctly set to email@example.com instead of the default identity for the account.
FYI: the bug is unchanged in 1.0 (20041206).
Confirmed with TB nightly 1.0+ (20050609) on Win2k.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is also an issue in Mozilla trunk builds.
Component: Message Compose Window → MailNews: Composition
Product: Thunderbird → Core
Version: unspecified → Trunk
The problem is the string method "search" used to test the addresses. Its parameter is supposed to be a RegExp, not a string, thus email addresses with + (and other RegExp modifiers) are treated as patterns: firstname.lastname@example.org is tested for "fo" + some"o"s + "email@example.com" - and fails.
Make sure a string search is performed by replacing the erroneous 'search' by 'indexOf'.
Attachment #187254 - Flags: superreview?(bienvenu) → superreview+
Attachment #187254 - Flags: review?(Stefan.Borggraefe) → review+
Comment on attachment 187254 [details] [diff] [review] replace erroneous search by indexOf Suite + TB, low risk.
Checking in mailCommands.js; new revision: 1.19; previous revision: 1.18 done Checking in mailCommands.js; new revision: 1.96; previous revision: 1.95 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.