[go: up one dir, main page]

Page MenuHomePhabricator

Bug 2074026 - Always handle CSP before MixedContentBlocker. r?emilio
ClosedPublic

Authored by • tschuster on Tue, Sep 22, 12:23 PM.
Referenced Files
Unknown Object (File)
Mon, Oct 12, 11:07 AM
Unknown Object (File)
Mon, Oct 12, 9:07 AM
Unknown Object (File)
Mon, Oct 12, 6:15 AM
Unknown Object (File)
Mon, Oct 12, 4:26 AM
Unknown Object (File)
Mon, Oct 12, 4:17 AM
Unknown Object (File)
Sun, Oct 11, 6:28 PM
Unknown Object (File)
Wed, Oct 7, 6:17 AM
Unknown Object (File)
Wed, Oct 7, 1:31 AM

Diff Detail

Repository
rFIREFOXAUTOLAND firefox-autoland
Branch
HEAD

Event Timeline

• tschuster created this revision.
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Tue, Sep 22, 12:23 PM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
• tschuster updated this revision to Diff 1386502.
• tschuster retitled this revision from WIP: Bug 2074026 - Always handle CSP before MixedContentBlocker to Bug 2074026 - Always handle CSP before MixedContentBlocker. r?emilio.
• tschuster added a reviewer: emilio.

I am totally open to alternative suggestions here. I was considering sorting the cached array for example, but that seemed a bit more difficult?

dom/base/nsContentPolicy.cpp
48

I think you could MOZ_ASSERT(NS_SUCCEDED(rv)) etc but...

124

So this works / doesn't do duplicate work because you removed the content-policy category entries right?

This seems testable perhaps? Also I have a vague memory of CSP and mixed content upgrade interacting poorly in the past, does that ring a bell? I couldn't find it immediately. I don't think this patch makes that any worse tho.

This revision is now accepted and ready to land.Wed, Sep 23, 3:04 PM

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!

• tschuster marked an inline comment as done.

Yes, this definitely should have a test. Our previous "test coverage" here was accidental and was nullified by D327776.

dom/base/nsContentPolicy.cpp
124

Yes, exactly. It doesn't seem like we really query/use the content-policy, so it seems like removing it from the list would be the easiest to prevent both policies from being used twice.

The analysis task source-test-mozlint-rejected-words failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-c-includes failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-header-guards failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-file-whitespace failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-mscom-init failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-dot-mozilla-reference failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-test-manifest failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-license failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-clang-format failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-mingw-cap failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-file-perm failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-eslint failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-codespell failed, but we could not detect any defect.
Please check this task manually.

The analysis task source-test-mozlint-trojan-source failed, but we could not detect any defect.
Please check this task manually.


If you see a problem in this automated review, please report it here.

This revision is now accepted and ready to land.Thu, Sep 24, 4:02 PM
This revision now requires review to proceed.Fri, Sep 25, 3:20 PM

Code analysis found 1 defect in diff 1389232:

  • 1 defect found by test-manifest (Mozlint)
WARNING: Found 1 defect (warning level) that can be dismissed.

You can run this analysis locally with:

  • ./mach lint --warnings --outgoing

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 1389232.

This revision is now accepted and ready to land.Fri, Sep 25, 3:58 PM