Details
- Reviewers
tschuster zombie - Group Reviewers
extension-reviewers - Bugzilla Bug ID
- 1960904
Diff Detail
- Repository
- rFIREFOXAUTOLAND firefox-autoland
- Branch
- HEAD
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
dom/security/IntegrityPolicy.cpp | ||
---|---|---|
375 | changed it as you suggested, matching more with the spec |
dom/security/IntegrityPolicy.h | ||
---|---|---|
29 | Sorry, actually, I guess like the components.conf change this might be for the next patch? |
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
169 | I forgot about this, sorry, but even though we don't support the Reporting API, will should still log something in the console. You probably want use nsContentUtils::ReportToConsoleByWindowID and have an error message for the blocking case, and a warning for the report-only case. |
This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
169 | added reporting (to console only for now) |
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
78–85 | I added this part, so I'm re-requesting review. |
dom/locales/en-US/chrome/security/security.properties | ||
---|---|---|
172 | Is this correct? Other strings use the format blocked ⇾ would block, also not sure about the colon. |
dom/locales/en-US/chrome/security/security.properties | ||
---|---|---|
172 | Thanks flod! Yes, we should make this error message more verbose and probably more similar to the existing CSP messages. Maybe something like:
And
| |
dom/security/IntegrityPolicyService.cpp | ||
78–85 | We would need a test for this. And I am wondering if we shouldn't use something like BasePrincipal::OverridesCSP here, which is used by LoadInfo::GetCsp. For now this probably ok. | |
80 | aLoadInfo->TriggerPrincipal() as it can never be null. |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
8 ↗ | (On Diff #1051887) | Is the expectation that the page itself couldn't load a script tag? If so, probably worth confirming that in the same test, as a sanity check. |
36–37 ↗ | (On Diff #1051887) | I think you can use test.sendMessage directly from here. |
56–58 ↗ | (On Diff #1051887) | you can just do = await extension.awaitMessage() |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
56–58 ↗ | (On Diff #1051887) | result = await extension.awaitMessage("script-loaded") |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
8 ↗ | (On Diff #1051887) | oh you are right added it |
36–37 ↗ | (On Diff #1051887) | huh I couldn't make it work last time but it works now, wonder what I did last time. changed it, thanks! |
56–58 ↗ | (On Diff #1051887) | ah I only did result = extension.awaitMessage("script-loaded") (without await) and thought it didn't work. changed it, thank you! |
Thanks for adding the extension test.
dom/locales/en-US/chrome/security/security.properties | ||
---|---|---|
172 | Sorry, I made a typo. it is missing | |
dom/security/IntegrityPolicyService.cpp | ||
187 | Let's just make this void. We can't really use the return value anyway. | |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
29 ↗ | (On Diff #1052067) | Uber nit: Can you just call this content_script.js? |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
19 ↗ | (On Diff #1052067) | We probably want registerCleanupFunction(() => { Services.prefs.clearUserPref("security.integrity_policy.enabled"); }); |
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
83 | LoadingPrincipal does need a null check. |
Thank you for reviewing!
dom/locales/en-US/chrome/security/security.properties | ||
---|---|---|
172 | oh right, i should have noticed too, updated it | |
dom/security/IntegrityPolicyService.cpp | ||
83 | yep i noted it above | |
154 | ||
187 | changed it | |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
19 ↗ | (On Diff #1052067) | added it thank you |
29 ↗ | (On Diff #1052067) | sure |
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
83 | oh i guess this was an old comment, sorry. |