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 | ||
---|---|---|
79–86 | 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 | ||
79–86 | 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. | |
81 | aLoadInfo->TriggerPrincipal() as it can never be null. |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
9 | 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. | |
37–38 | I think you can use test.sendMessage directly from here. | |
57–59 | you can just do = await extension.awaitMessage() |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
57–59 | result = await extension.awaitMessage("script-loaded") |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
9 | oh you are right added it | |
37–38 | huh I couldn't make it work last time but it works now, wonder what I did last time. changed it, thanks! | |
57–59 | 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 | ||
30 | Uber nit: Can you just call this content_script.js? |
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_integritypolicy.js | ||
---|---|---|
20 | 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 | ||
20 | added it thank you | |
30 | sure |
dom/security/IntegrityPolicyService.cpp | ||
---|---|---|
83 | oh i guess this was an old comment, sorry. |