Skip to content

Commit f9531e1

Browse files
authored
FF148 Relnote: Trusted Types Ship (mdn#42927)
1 parent 544bd98 commit f9531e1

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -361,28 +361,6 @@ The {{domxref("CloseWatcher")}} interface allows developers to implement UI comp
361361
- `dom.closewatcher.enabled`
362362
- : Set to `true` to enable.
363363

364-
### Trusted Types API
365-
366-
The [Trusted Types API](/en-US/docs/Web/API/Trusted_Types_API) provides mechanisms to ensure that functions that can potentially be used as vectors for XSS attacks are only able to be called with data that has been validated or sanitized.
367-
The API is enabled in early beta releases ([Firefox bug 1992941](https://bugzil.la/1992941)).
368-
369-
This includes (non-exhaustively):
370-
371-
- Addition of the {{domxref("TrustedTypePolicyFactory")}}, {{domxref("TrustedTypePolicy")}}, {{domxref("TrustedHTML")}}, {{domxref("TrustedScript")}}, {{domxref("TrustedScriptURL")}} interfaces, and the `trustedTypes` property on {{domxref("Window/trustedTypes", "Window")}} and {{domxref("WorkerGlobalScope/trustedTypes", "WorkerGlobalScope")}}.
372-
- Updates to [injection sink interfaces](/en-US/docs/Web/API/Trusted_Types_API#injection_sink_interfaces), such as {{domxref("Element.innerHTML")}} and {{domxref("Document.write()", "document.write()")}}, to allow the `TrustedHTML`, `TrustedScript`, `TrustedScriptURL` to be passed as well as strings.
373-
- Support for the [`require-trusted-types-for`](/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/require-trusted-types-for) and [`trusted-types`](/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/trusted-types) directives, and the [`'trusted-types-eval'`](/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy#trusted-types-eval) keyword, of the {{HTTPHeader("Content-Security-Policy")}} HTTP header.
374-
These can be used to enforce trusted types instead of strings, name the specific policies that are allowed, and to enable [`eval()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) and similar functions to be used when [Trusted Types](/en-US/docs/Web/API/Trusted_Types_API) are supported and enforced.
375-
376-
| Release channel | Version added | Enabled by default? |
377-
| ----------------- | ------------- | ------------------- |
378-
| Nightly | 145 | Yes |
379-
| Developer Edition | 145 | Yes |
380-
| Beta | 145 | Yes |
381-
| Release | 133 | No |
382-
383-
- `dom.security.trusted_types.enabled`
384-
- : Set to `true` to enable.
385-
386364
### HTML Sanitizer API
387365

388366
The [HTML Sanitizer API](/en-US/docs/Web/API/HTML_Sanitizer_API) allow developers to take untrusted strings of HTML and sanitize them for safe insertion into a document's DOM.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ Firefox 148 is the current [Beta version of Firefox](https://www.firefox.com/en-
5252

5353
### APIs
5454

55+
- The [Trusted Types API](/en-US/docs/Web/API/Trusted_Types_API) is now supported.
56+
This provides mechanisms to ensure that properties and functions that can potentially be used as vectors for XSS attacks are only able to be called with data that has been passed through a transformation function.
57+
The mechanisms allow auditing of unsafe uses of code.
58+
They don't mandate how the data is transformed, but might, for example, be used to sanitize unsafe HTML elements from user-provided strings.
59+
([Firefox bug 1994690](https://bugzil.la/1994690)).
60+
5561
- The {{domxref("Location.ancestorOrigins")}} property is now supported, which enables you to determine whether a document is being embedded in an {{htmlelement("iframe")}} and, if so, by which site(s).
5662
([Firefox bug 1085214](https://bugzil.la/1085214)).
5763

0 commit comments

Comments
 (0)