Closed Bug 796869 Opened 12 years ago Closed 12 years ago

[contacts] Get ready for CSP

Categories

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

defect

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: arcturus, Assigned: arcturus)

Details

(Whiteboard: QARegressExclude)

Attachments

(2 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4

Steps to reproduce:

Current contacts application is not ready for CSP.

Currently the policy allows:
script-src: 'self' 'unsafe-inline'; object-src: 'none'; style-src: 'self' ;

But in the future will be:
script-src: 'self'; object-src: 'none'; style-src: 'self' ;

Which means that inline scripts will be eliminated.


Actual results:

Contacts app is 'abusing' the inline scripts for several actions


Expected results:

in-line scripts should be removed
blocking-basecamp: --- → ?
Tried to add the patch with the addon but it's not working, anyway can review the changes in the PR:

https://github.com/mozilla-b2g/gaia/pull/5637

Thanks
Jose Manuel can you r? as well
yep
Attached file Patch v1 (obsolete) —
Attachment #667386 - Flags: review?(jmcf)
Attachment #667386 - Flags: review?(alberto.pastor)
First set of comments provided through Github at https://github.com/mozilla-b2g/gaia/pull/5637/files
I agree with Jose Manuel in using separate function for the listeners. Apart from that r+ from my side.
Attached file Patch v2 (obsolete) —
Patch v2

no with specific functions and trying to do a smarter way of walking the elements
Attachment #667522 - Flags: review?(alberto.pastor)
Attachment #667522 - Flags: feedback?(jmcf)
Attachment #667386 - Attachment is obsolete: true
Attachment #667386 - Flags: review?(jmcf)
Attachment #667386 - Flags: review?(alberto.pastor)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #667522 - Attachment is obsolete: true
Attachment #667522 - Flags: review?(alberto.pastor)
Attachment #667522 - Flags: feedback?(jmcf)
Attached patch Patch v3Splinter Review
Attachment #667901 - Flags: review?(jmcf)
Attachment #667901 - Flags: review?(jmcf) → review+
Landed in gaia:

https://github.com/mozilla-b2g/gaia/pull/5637
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
blocking-basecamp: ? → +
Priority: -- → P1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → francisco.jordano
Latest changes on the building blocks brought back some of the infamous inline javascript.
yep, the onclick=return false. We need to be very careful during code reviews ...
Attachment #671849 - Flags: review?(alberto.pastor)
Attachment #671849 - Flags: review?(alberto.pastor) → review+
Landed:

https://github.com/mozilla-b2g/gaia/commit/dd1b8b015a930b9668f7b2f862700307a8153103
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Whiteboard: QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: