Closed
Bug 761069
Opened 13 years ago
Closed 13 years ago
B2G MMS: support email addressing model
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: vicamo, Assigned: vicamo)
References
Details
Attachments
(1 file, 2 obsolete files)
|
2.22 KB,
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
The MMS Addressing Model[1] lists four possible categories: email, device-address, alphanum-shortcode, and num-shortcode. Current implementation in bug 749856 uses "unknown" for email addresses.
Updated•13 years ago
|
blocking-basecamp: --- → ?
Comment 1•13 years ago
|
||
MMS is desired to be ready for basecamp, but does not actually block.
blocking-basecamp: ? → -
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → vyang
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•13 years ago
|
||
Attachment #645199 -
Flags: review?(philipp)
| Assignee | ||
Comment 4•13 years ago
|
||
break the long long regex down.
Attachment #645199 -
Attachment is obsolete: true
Attachment #645199 -
Flags: review?(philipp)
Attachment #645220 -
Flags: review?(philipp)
Comment 5•13 years ago
|
||
Comment on attachment 645220 [details] [diff] [review]
v1
Review of attachment 645220 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mms/src/ril/MmsPduHelper.jsm
@@ +97,5 @@
> + // 3.4 of RFC2822, but excluding the obsolete definitions as indicated by
> + // the "obs-" prefix. Here we match only `addr-spec`.
> + let dotatom = "[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+";
> + let addrspec = new RegExp(dotatom + "(?:" + dotatom + ")*@" +
> + dotatom + "(?:" + dotatom + ")*");
I'm not sure I'm comfortable with validating the email address with such a specific RegExp. I can think of several invalid email addresses that would pass this test. Conversely I bet there are valid addresses that wouldn't. Maybe we can just check for one and only one "@" character in the string, and leave the validation up to the email protocol layer?
(Also, it's unnecessary to compile the RegExp every time we pass through this code. I would suggest a lazy global, if we were to keep it.)
Attachment #645220 -
Flags: review?(philipp)
| Assignee | ||
Comment 6•13 years ago
|
||
Match a '@' char instead and maybe come back for more strict/completed checks if necessary. Thanks Philipp.
Attachment #645220 -
Attachment is obsolete: true
Attachment #645704 -
Flags: review?(philipp)
Updated•13 years ago
|
Attachment #645704 -
Flags: review?(philipp) → review+
| Assignee | ||
Comment 7•13 years ago
|
||
Target Milestone: --- → mozilla17
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
blocking-basecamp: ? → +
You need to log in
before you can comment on or make changes to this bug.
Description
•