thunderbird / thunderbird/thunderbird-android
Unusual email addresses are incorrectly parsed
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
Expected behaviour
The list of valid emails on Wikipedia should be parsed correctly and not adjusted.
Actual behaviour
Quotes are removed from email addresses.
Steps to reproduce
Run the following test case.
@Test
public void testParseUnusualEmails() {
String[] testEmails = new String [] {
"prettyandsimple@example.com",
"very.common@example.com",
"disposable.style.email.with+symbol@example.com",
"other.email-with-dash@example.com",
"\"much.more unusual\"@example.com",
"\"very.unusual.@.unusual.com\"@example.com",
//"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
"\"very.(),:;<>[]\\\".VERY.\\\"very@\\\\ \\\"very\\\".unusual\"@strange.example.com",
"admin@mailserver1",
"#!$%&'*+-/=?^_`{}|~@example.org",
"\"()<>[]:,;@\\\\\\\"!#$%&'*+-/=?^_`{}| ~.a\"@example.org",
"\" \"@example.org",
"example@localhost",
"example@s.solutions",
"user@com",
"user@localserver",
"user@[IPv6:2001:db8::1]"
};
for(String testEmail: testEmails) {
Address[] addresses = Address.parse("Anonymous <"+testEmail+">");
assertEquals(1, addresses.length);
assertEquals(testEmail, addresses[0].getAddress());
}
}
Environment
K-9 Mail version: master
Android version: N/A
Account type (IMAP, POP3, WebDAV/Exchange): N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Address.parse entry point and use the supplied testParseUnusualEmails reproducer as the first check. Trace how quoted addresses are parsed, then verify that every listed address is returned unchanged and that the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100