Skip to content

Commit 5fe2dbd

Browse files
authored
FF142 Relnote/Expr features: Integrity-Policy can be enforced on styles behind pref (mdn#40747)
1 parent ac458df commit 5fe2dbd

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

files/en-us/mozilla/firefox/experimental_features/index.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,11 @@ Note that supported policies can be set through the [`allow`](/en-US/docs/Web/HT
770770

771771
## HTTP
772772

773-
### Integrity-Policy and Integrity-Policy-Report-Only headers
773+
### Integrity policy for script resources
774774

775-
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported. These allow websites to either enforce [subresource integrity guarantees](/en-US/docs/Web/Security/Subresource_Integrity) for scripts or only report violations of the policy, respectively.
776-
When these headers are used, the browser blocks the loading of scripts that either lack the [`integrity`](/en-US/docs/Web/HTML/Reference/Elements/script#integrity) attribute or have an integrity hash that doesn't match the script resource on the server.
775+
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for script resources. These allow websites to either enforce [subresource integrity guarantees](/en-US/docs/Web/Security/Subresource_Integrity) for scripts or only report violations of the policy, respectively.
776+
Note that Firefox ignores reporting endpoints, and logs violations to the developer console.
777+
When `Integrity-Policy` is used, the browser blocks the loading of scripts that either lack the [`integrity`](/en-US/docs/Web/HTML/Reference/Elements/script#integrity) attribute or have an integrity hash that doesn't match the script resource on the server.
777778
The browser will also stop requests in [`no-cors` mode](/en-US/docs/Web/API/Request/mode#no-cors) from ever being made, such as those from a {{htmlelement("script")}} element without the [`crossorigin`](/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) attribute.
778779
([Firefox bug 1976656](https://bugzil.la/1976656)).
779780

@@ -787,6 +788,23 @@ The browser will also stop requests in [`no-cors` mode](/en-US/docs/Web/API/Requ
787788
- `security.integrity_policy.enabled`
788789
- : Set to `true` to enable.
789790

791+
### Integrity policy for stylesheet resources
792+
793+
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for style resources. These allow websites to either enforce [subresource integrity guarantees](/en-US/docs/Web/Security/Subresource_Integrity) for styles or only report violations of the policy, respectively.
794+
Note that Firefox ignores reporting endpoints, and logs violations to the developer console.
795+
When `Integrity-Policy` is used, the browser blocks the loading of styles referenced in a {{HTMLElement("link")}} element with [`rel="stylesheet"`](/en-US/docs/Web/HTML/Reference/Attributes/rel#stylesheet) that either lack the [`integrity`](/en-US/docs/Web/HTML/Reference/Elements/script#integrity) attribute or have an integrity hash that doesn't match the resource on the server.
796+
([Firefox bug 1976656](https://bugzil.la/1976656)).
797+
798+
| Release channel | Version added | Enabled by default? |
799+
| ----------------- | ------------- | ------------------- |
800+
| Nightly | 142 | No |
801+
| Developer Edition | 142 | No |
802+
| Beta | 142 | No |
803+
| Release | 142 | No |
804+
805+
- `security.integrity_policy.stylesheet.enabled`
806+
- : Set to `true` to enable.
807+
790808
### Accept header with MIME type image/jxl
791809

792810
The HTTP [`Accept`](/en-US/docs/Web/HTTP/Reference/Headers/Accept) header in [default requests and image requests](/en-US/docs/Web/HTTP/Guides/Content_negotiation/List_of_default_Accept_values) can be configured via a preference to indicate support for the `image/jxl` MIME type.

files/en-us/mozilla/firefox/releases/142/index.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,16 @@ Firefox 142 is the current [Beta version of Firefox](https://www.firefox.com/en-
117117

118118
The CSS {{CSSXRef(":heading")}} pseudo-class allows you to style all [heading elements](/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements) (`<h1>`-`<h6>`) at once rather than targeting them individually. The {{CSSXRef(":heading_function", ":heading()")}} functional pseudo-class allows you to style heading elements that match the [`<An+B>`](/en-US/docs/Web/CSS/:heading_function#functional_notation) notation. ([Firefox bug 1974386](https://bugzil.la/1974386)).
119119

120-
- **`Integrity-Policy` and `Integrity-Policy-Report-Only`** (Nightly): `security.integrity_policy.enabled`
120+
- **`Integrity-Policy` and `Integrity-Policy-Report-Only`** for scripts (Nightly): `security.integrity_policy.enabled`
121121

122-
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported. These allow websites to either enforce [subresource integrity guarantees](/en-US/docs/Web/Security/Subresource_Integrity) for scripts or only report violations of the policy, respectively.
122+
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for script resources. These allow websites to either enforce [subresource integrity guarantees](/en-US/docs/Web/Security/Subresource_Integrity) for scripts or only report violations of the policy, respectively.
123123
([Firefox bug 1976656](https://bugzil.la/1976656)).
124124

125+
- **`Integrity-Policy` and `Integrity-Policy-Report-Only`** for stylesheets: `security.integrity_policy.stylesheet.enabled`
126+
127+
The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for stylesheet resources. These allow websites to either enforce or only report violations of the policy, respectively.
128+
([Firefox bug 1974247](https://bugzil.la/1974247)).
129+
125130
These features are shipping in Firefox 142 but are disabled by default.
126131
To experiment with them, search for the appropriate preference on the `about:config` page and set it to `true`.
127132
You can find more such features on the [Experimental features](/en-US/docs/Mozilla/Firefox/Experimental_features) page.

0 commit comments

Comments
 (0)