Commit graph

22 commits

Author SHA1 Message Date
Moonchild
721ded9b48 Issue #2466 - Part 3: Implement style-src-elem and style-src-attr 2024-02-08 14:33:59 +08:00
Moonchild
ff01a35bdb Issue #2466 - Part 2: Implement script-src-elem and script-src-attr 2024-02-08 14:33:43 +08:00
Moonchild
4ea2206c15 Issue #2466 - Part 1: Reduce nsContentPolicy type usage.
Use CSPDirective instead, since it directly deals with CSP anyway.
This cleanup prepares for the following changes.
2024-02-08 14:33:28 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
Gaming4JC
30797d4da8 backport mozbug 1334776 - CVE-2017-7797 Header name interning leaks across origins
Potential attack: session supercookie.

[Moz Notes](https://bugzilla.mozilla.org/show_bug.cgi?id=1334776#c5):
"The problem is that for unknown header names we store the first one we see and then later we case-insensitively match against that name *globally*. That means you can track if a user agent has already seen a certain header name used (by using a different casing and observing whether it gets normalized). This would allow you to see if a user has used a sensitive service that uses custom header names, or allows you to track a user across sites, by teaching the browser about a certain header case once and then observing if different casings get normalized to that.

What we should do instead is only store the casing for a header name for each header list and not globally. That way it only leaks where it's expected (and necessary) to leak."

[Moz fix note](https://bugzilla.mozilla.org/show_bug.cgi?id=1334776#c8):
"nsHttpAtom now holds the old nsHttpAtom and a string that is case sensitive (only for not standard headers).
So nsHttpAtom holds a pointer to a header name. (header names are store on a static structure). This is how it used to be. I left that part the same but added a nsCString which holds a string that was used to resoled the header name. So when we parse headers we call ResolveHeader with a char*. If it is a new header name the char* will be stored in a HttpHeapAtom, nsHttpAtom::_val will point to HttpHeapAtom::value and the same strings will be stored in mLocalCaseSensitiveHeader. For the first resolve request they will be the same but for the following maybe not. At the end this nsHttpAtom will be stored in nsHttpHeaderArray. For all operation we will used the old char* except when we are returning it to a script using VisitHeaders."
2019-02-16 00:14:28 +08:00
janekptacijarabaci
a6d927b167 Bug 1469150 - Tests added to check scripts with valid nonce is allowed if URL redirects (follow up) 2019-02-16 00:04:36 +08:00
janekptacijarabaci
c8131a687a Bug 1469150 - CSP: Scripts with valid nonce get blocked if URL redirects
https://bugzilla.mozilla.org/show_bug.cgi?id=1469150
2019-02-16 00:04:34 +08:00
Gaming4JC
d4ac94cf3e Remove support and tests for HSTS priming from the tree. Fixes #384 2019-02-15 23:59:39 +08:00
janekptacijarabaci
79fb0b8506 Bug 1329288 - Test ContentPolicy blocks opening a new window 2019-02-15 23:49:23 +08:00
janekptacijarabaci
18d312235d moebius#230: Consider blocking top level window data: URIs (part 3/3 without tests)
https://github.com/MoonchildProductions/moebius/pull/230
2019-02-15 23:49:20 +08:00
janekptacijarabaci
73f89fe562 moebius#226: Consider blocking top level window data: URIs (part 2/2 without tests)
https://github.com/MoonchildProductions/moebius/pull/226
2019-02-15 23:49:19 +08:00
janekptacijarabaci
712d19e1b7 moebius#223: Consider blocking top level window data: URIs (part 1/3 without tests)
https://github.com/MoonchildProductions/moebius/pull/223
2019-02-15 23:49:17 +08:00
janekptacijarabaci
8aa17f5b90 moebius#159: CSP - support for "frame-ancestors" in "Content-Security-Policy-Report-Only"
https://github.com/MoonchildProductions/moebius/pull/159
2019-02-15 23:45:38 +08:00
janekptacijarabaci
6509b677d3 Bug 1288768 - Better error reporting for network errors in workers 2019-02-15 23:42:47 +08:00
wolfbeast
0665a343a5 Add support for CSP v3 "worker-src" directive 2019-02-15 23:35:05 +08:00
janekptacijarabaci
96886141e1 CSP: connect-src 'self' should always include https: and wss: schemes 2019-02-15 23:33:23 +08:00
janekptacijarabaci
ee67abc801 CSP: Support IDNs in connect-src 2019-02-15 23:33:21 +08:00
janekptacijarabaci
7de286b67c CSP: Ignore nonces on <img> per spec 2019-02-15 23:33:20 +08:00
janekptacijarabaci
54e7645cb6 CSP: Upgrade SO navigational requests per spec. 2019-02-15 23:33:18 +08:00
janekptacijarabaci
a01c9abce8 CSP 2 - ignore (x-)frame-options if CSP with frame-ancestors directive exists 2019-02-15 23:33:17 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00