Closed Bug 817563 Opened 12 years ago Closed 12 years ago

[PhoneNumberJS] Remove .eval() from code

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+)

VERIFIED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +

People

(Reporter: borjasalguero, Assigned: gwagner)

References

Details

Attachments

(2 files)

Currently Im getting the following line debugging: E/GeckoConsole( 396): " {file: "app://sms.gaiamobile.org/shared/js/phoneNumberJS/PhoneNumber.js" line: 56 column: 0 source: "call to eval() or related function blocked by CSP"}] Due to this bug this code is not working anymore, and threading is broken :S!
Assignee: nobody → gal
blocking-basecamp: --- → ?
Priority: -- → P1
Target Milestone: --- → B2G C2 (20nov-10dec)
PhoneNumber.js has been broken by bug 797657. I haven't tried to remove eval() usage as we are planning to reimplement it in the platform bug 811539, 811538.
Depends on: 797657, 811539
blocking-basecamp: ? → +
Flags: needinfo?(fabrice)
Gregor, how are we doing on bug 811538? If this is at risk, we should block on this.
blocking-basecamp: + → ?
Flags: needinfo?(fabrice) → needinfo?(anygregor)
(In reply to Fabrice Desré [:fabrice] from comment #2) > Gregor, how are we doing on bug 811538? If this is at risk, we should block > on this. It's on my list right after bug 811026.
Flags: needinfo?(anygregor)
Looks like this may have been renomed by accident. Marking as + again.
blocking-basecamp: ? → +
Fixing assignee based on comment #3.
Assignee: gal → anygregor
Bug 811538 is fixed. This should be a duplicate of bug 811539 now.
Hi Gregor! We have two issues here. One is applying the patch to Gecko and then the patch to Gaia (We need time to apply & test everything there), and the other is that this 'eval()' is breaking the current SMS App... Could you update the change of 'eval()' in Gaia as well? Because we are going to have our smoke test with errors until applying the whole path... That's why this one is not a duplicated of the other one! Thanks!
Marking 818632 as a dup of this bug. Bug 818632 should be checked once this is fixed though.
(In reply to Borja Salguero [:borjasalguero] (limited access to email until 10th December) from comment #7) > Could you update the change of 'eval()' in Gaia as well? Because we are going to > have our smoke test with errors until applying the whole path... That's why this > one is not a duplicated of the other one! Thanks! If you want to allow PhoneNumberJS to work in gaia, you can put following line in your gaia/build/custom-prefs.js file: pref("security.apps.certified.CSP.default", "options inline-script eval-script; default-src *; script-src 'self'; object-src 'none'; style-src 'self'"); That will temporary allow apps to still use eval for your build.
HI Alexandre. I know that I can fix my custom build for neglecting CSP policy, but all dogfooders are having issues with threading in SMS App, and it's due to PhoneNumberJS is not working :(. That's why it's important to fix!
This will be a no-op bug once we delete PhoneNumberJS so I'm moving it to the C3 milestone.
Target Milestone: B2G C2 (20nov-10dec) → B2G C3 (12dec-1jan)
Attached patch patch (deleted) — Splinter Review
Attachment #689338 - Flags: review?(gal)
Attached file pointer (deleted) —
Attachment #689340 - Flags: review?(gal)
Attachment #689340 - Flags: review?(fbsc)
Attachment #689340 - Flags: review?(fbsc) → review+
I've run the tests and it's working ;) Thanks for the patch Gregor!
Blocks: 816821
https://github.com/mozilla-b2g/gaia/commit/93dd992e63af144b9e75fdfdd658d9acb515e762 We don't have to fix the gecko side. eval should work there.
Attachment #689338 - Flags: review?(gal)
Attachment #689340 - Flags: review?(gal)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM: Device Interfaces → Gaia
Product: Core → Boot2Gecko
Version: Trunk → unspecified
Nice patch. Sorry that I didn't see the review in time.
Status: RESOLVED → VERIFIED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: