Closed
Bug 910153
Opened 11 years ago
Closed 11 years ago
[Email] email address in a plain message body is broken, when multiple sub domains present.
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)
RESOLVED
FIXED
blocking-b2g | leo+ |
People
(Reporter: leo.bugzilla.gaia, Assigned: asuth)
References
Details
(Whiteboard: [TD-83670])
Attachments
(2 files, 1 obsolete file)
STR: 1. Create an IMAP account. 2. Continue to Email -> Message box 3. Compose an Email 4. Enter an email address which has multiple sub domains. (ex: test@yahoo.co.in) 5. Send the email Result: Open the sent email, complete email address is not anchored. for the above example it enables the link to only "test@yahoo.co" Expected: complete email address should be recognized and should be allowed to select. Note: 1. This happens only with the email which has plain body ( not an HTML message) 2. Reproduced in Gaia Master also.
Comment 1•11 years ago
|
||
Picture shows the email addresses that are broken
Comment 3•11 years ago
|
||
Working on this issue. In case of plain body, email addresses REGEX not verifying the multiple sub domains. Working on the issue patch will be uploaded to soon.
QA Contact: psingapati
Updated•11 years ago
|
Assignee: nobody → psingapati
QA Contact: psingapati
Comment 4•11 years ago
|
||
PR is raised to gelam, added multiple sub domains check to email address Regex. https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/242
Attachment #796556 -
Flags: review?(bugmail)
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 796556 [details]
Pointer to PR
Wow, I really did not look into our e-mail reg-exp enough there previously when I cleaned up the URL logic.
Your fix works but I realized there are a number of other cases we handle poorly. Uppercase, IDN roots, etc. Also, we need unit tests for these things.
So I've whipped up an alternate implementation that is based more on the regex we are using for URLs which does not try and generatively build the domain segments. The main performance reason for this is that it lets us explicitly bound the length of the string the regexp will try and consume. The (.[a-z]+)+ could consume an arbitrarily long string; the number of segments could be bounded, but since the segments could each be rather long, the worst-case performance scenario could get very bad.
I'll attach my pull request in one sec and ask you to review.
Attachment #796556 -
Attachment is obsolete: true
Attachment #796556 -
Flags: review?(bugmail)
Assignee | ||
Comment 6•11 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•11 years ago
|
Attachment #796864 -
Flags: review?(psingapati)
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 796864 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/243 Marcus, if you'd like to take a look at this from a code perspective, that would be great. Note that bug 858370 is where we want to get rid of these regexps, so our goal is not so much perfection as just avoiding any obvious bloopers.
Attachment #796864 -
Flags: review?(mcav)
Comment 8•11 years ago
|
||
Comment on attachment 796864 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/243 Looks good to me; it works against any pathological cases I could come up with.
Attachment #796864 -
Flags: review?(mcav) → review+
Comment 9•11 years ago
|
||
Comment on attachment 796864 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/243 Issue is working fine with the patch. Thanks
Attachment #796864 -
Flags: review?(psingapati) → review+
Assignee | ||
Comment 10•11 years ago
|
||
landed: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/243 https://github.com/mozilla-b2g/gaia-email-libs-and-more/commit/b7f029738e1472053e883c35e3379f78bd0424f7 https://github.com/mozilla-b2g/gaia/pull/11837 https://github.com/mozilla-b2g/gaia/commit/40f43a0b0e25b0cdeb6e7c82387d1fd2517c1ac6
Assignee: psingapati → bugmail
Status: NEW → RESOLVED
Closed: 11 years ago
status-b2g18:
--- → affected
status-b2g18-v1.0.1:
--- → wontfix
Resolution: --- → FIXED
Comment 11•11 years ago
|
||
Uplifted 40f43a0b0e25b0cdeb6e7c82387d1fd2517c1ac6 to: v1-train: cffe2b7d4f382a5c2239723f6598e19c8d9da732
Comment 12•11 years ago
|
||
v1.1.0hd: cffe2b7d4f382a5c2239723f6598e19c8d9da732
status-b2g-v1.1hd:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•