Closed Bug 859719 Opened 11 years ago Closed 11 years ago

[Dialer] Follow up to bug 835750 - Validate the numbers that are passed to the RIL to dial

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 fixed, b2g18-v1.0.1 fixed)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: gtorodelvalle, Assigned: gtorodelvalle)

References

Details

Attachments

(1 file)

The code included in the patch to bug 835750 is not correct regarding the isValid() function in telephony_helper.js. The case where the match() function of the String object returns null is not properly dealt. Instead, Antonio suggests using the RegExp.test() function.
blocking-b2g: --- → tef?
Attached file Associated PR.
Attachment #735082 - Flags: review?(francisco.jordano)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Why should this bug be a blocker?
Flags: needinfo?(gtorodelvalle)
Cause the original one was a security blocker and without this it doesn't work correctly (and I believe it even throws an exception on some cases).
blocking-b2g: tef? → tef+
Comment on attachment 735082 [details]
Associated PR.

Much better approach :)
Attachment #735082 - Flags: review?(francisco.jordano) → review+
(In reply to Antonio Manuel Amaya Calvo from comment #3)
> Cause the original one was a security blocker and without this it doesn't
> work correctly (and I believe it even throws an exception on some cases).

+1 and basically the risk for this patch is 0 as it's just fixing a very concrete problem.
Assignee: nobody → gtorodelvalle
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
The validation of this patch is not straight forward since there is not an easy way to get an "invalid number" (such as +34666AAA666) reach the Dialer. I tried to force it accessing this page http://jsbin.com/agogat/2 from the device's browser but the browser filters the number before providing the data to the Dialer "dial" activity, which is fine, BTW :-)

I force and tested it programmatically but I am not currently aware of any means to be able to test in on the device by the QA team. Are you, Antonio? :-)
Flags: needinfo?(amac)
Enter an invalid number on one of your gmail contacts, import it and try to dial his number. That should test this.
Flags: needinfo?(amac)
Also you can create a contacts.json with the default contacts and add any kind of data directly when doing a make install-gaia
(In reply to Francisco Jordano [:arcturus] from comment #9)
> Also you can create a contacts.json with the default contacts and add any
> kind of data directly when doing a make install-gaia

Example of this:

https://github.com/telefonicaid/firefoxos-gaia-spain/blob/master/contacts.json
Perfect! If QA have any trouble validating this, please let us know ;-) Thanks!
The issue appears to be fixed on v1.1 and v1.0.1 builds. 

Environmental  Variables:
Unagi Build ID: 20130410070209
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/56c922308fd1
Gaia: 0a9f78bffafda93a159c1f502e8b110c2f49a500

Invalid phone number (The phone number you are calling is not valid) Displays as expected.
Status: RESOLVED → VERIFIED
Thank you guys for the steps that made this verification easy, Thank you again, QAnalyst Test Team.
Uplifted commit 77e291fef67814a3b6149c5076789694ae12e020 as:
v1-train: 8d4b299144f61d52aa3fc51b11d366beb38b326a
v1.0.1: 70c120387b75867f4cec361a9a825309ea714598
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: