Intent to Prototype: Sanitizer API

369 views
Skip to first unread message

Daniel Vogelheim

unread,
Jul 3, 2020, 7:23:50 AM7/3/20
to blink-dev
voge...@chromium.org,mk...@chromium.org,l...@chromium.org https://github.com/WICG/purification Specification: https://wicg.github.io/purification/ None Build an API for a user input sanitizer into the web platform, following the design at: https://github.com/WICG/purification
Yes.
We intend to use WPT as the primary test platform for this feature. https://chromestatus.com/feature/5786893650231296

Yoav Weiss

unread,
Jul 3, 2020, 7:35:36 AM7/3/20
to Daniel Vogelheim, blink-dev
On Fri, Jul 3, 2020 at 1:23 PM 'Daniel Vogelheim' via blink-dev <blin...@chromium.org> wrote:

Any particular reason?
 
Build an API for a user input sanitizer into the web platform, following the design at: https://github.com/WICG/purification
Yes.
We intend to use WPT as the primary test platform for this feature. https://chromestatus.com/feature/5786893650231296

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALG6KPMTzPU7QJoohNQjaGVZXjgmNzTjmBdRuuNNB%2BaamcQb3Q%40mail.gmail.com.

Daniel Vogelheim

unread,
Jul 3, 2020, 7:47:53 AM7/3/20
to Yoav Weiss, blink-dev
On Fri, Jul 3, 2020 at 1:35 PM Yoav Weiss <yo...@yoav.ws> wrote:
On Fri, Jul 3, 2020 at 1:23 PM 'Daniel Vogelheim' via blink-dev <blin...@chromium.org> wrote:
None

Any particular reason?

Not really. We're fairly early in the process, and the spec & API shape aren't entirely clear yet. One reason for starting some trial implementation is to figure those things out. I'd have assumed we need more substance for a formal review. That said, I'll be happy to initiate a review if you think the time is right.

Yoav Weiss

unread,
Jul 3, 2020, 8:02:20 AM7/3/20
to Daniel Vogelheim, blink-dev
TAG reviews have a couple of paths nowadays: Early design review vs. specification review. It's possible that it's too early for the former, that's your call.
At the same time, it'd be good to verify we don't file the latter too late, and not give TAG folks enough time to actually look at it. Filing an early design review helps ensure they are familiar with the problem space you're trying to solve, and can provide early guidance. 

Eli Grey

unread,
Jul 5, 2020, 11:18:45 AM7/5/20
to blink-dev
I'm confused. How does the "example usage" in the explainer actually justify this API?

Using the Sanitizer API does not affect the security properties of this example code at all:

document.getElementById("...").textContent = sanitizers.html.toString(user_supplied_value);

Daniel Vogelheim

unread,
Jul 6, 2020, 6:36:31 AM7/6/20
to Eli Grey, blink-dev
You are correct, this was a bad example.

Presently, the purpose of the examples is mostly to demonstrate what the WebIDL fragments mean, and not so much to justify the design. I personally find code examples easier to read than IDL.

Jun Kokatsu

unread,
Aug 20, 2020, 4:36:29 PM8/20/20
to blink-dev, Daniel Vogelheim
+1 on this 😊
Sanitizer API will be useful, especially with Trusted Types. And I hope that this API will have good integration with Trusted Types in a way which will make developer to roll out Trusted Types more easily.
I made some comment to an issue regarding this 😊

Reply all
Reply to author
Forward
0 new messages