-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fromLiteral
#411
Comments
Just to note a thought I had, if / when we spec fromLiteral again, I think we should make it opt-in rather than it always being allowed. I propose a new keyword for the This way Obviously fromLiteral would also work if you didn't include |
We discussed this in the past, and concluded that |
If we imagine a future with the sanitizer API, I personally think it's valuable to have a way to completely disable the legacy sinks. I know it's not directly part of the threat model of TT but still feels like it could be useful, and doesn't have much of a down side? Just something I think is worth considering again when the time comes. |
What do you mean by a legacy sink? A place that accepts But also, if you want certain APIs to not work, changing them directly is probably a better way instead of action-at-a-distance that might not hold over time unless we're very careful. I.e., we could just have a boolean that makes anything that takes |
Sorry yeah to clarify by legacy sink I mean something like innerHTML as opposed to setHTML.
That's a good point, setHTMLUnsafe is an interesting one because it's not safe but does support the sanitiser and is clearly a "modern" API and perhaps that's a good reason why we can't just (advocate to) permanently disable all sinks that take a Trusted type using the CSP as I was suggesting above.
Yeah you're probably right, something like this fromLiteral case is already an example of an API change that changes the assertion that the TT CSP can guaruntee these sinks are disabled. So perhaps that is best left to something else. |
See #398.
The text was updated successfully, but these errors were encountered: