Closed Bug 761069 Opened 13 years ago Closed 13 years ago

B2G MMS: support email addressing model

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla17
blocking-basecamp +

People

(Reporter: vicamo, Assigned: vicamo)

References

Details

Attachments

(1 file, 2 obsolete files)

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.
blocking-basecamp: --- → ?
MMS is desired to be ready for basecamp, but does not actually block.
blocking-basecamp: ? → -
MMS is requred for v1, but not for Brazil
blocking-basecamp: - → ?
Assignee: nobody → vyang
Status: NEW → ASSIGNED
Attached patch v0 (obsolete) — Splinter Review
Attachment #645199 - Flags: review?(philipp)
Attached patch v1 (obsolete) — Splinter Review
break the long long regex down.
Attachment #645199 - Attachment is obsolete: true
Attachment #645199 - Flags: review?(philipp)
Attachment #645220 - Flags: review?(philipp)
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)
Attached patch v2Splinter Review
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)
Attachment #645704 - Flags: review?(philipp) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
blocking-basecamp: ? → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: