Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
1–10 of 172 posts
Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#2I'm also rather sceptical of things that "sanitise" HTML, both because there's a long history of them having holes, and because it's not immediately clear what that means, and what exactly is considered "safe".
Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#3Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#4This kind of thing always makes me nervous, because you end with a mix of methods where you can (supposedly) pass arbitrary user input to them and they'll safely handle it, and methods where you can't do that without introducing vulnerabilities - but it's not at all clear which is which from the names. Ideally you design that in from the state, so any dangerous functions are very clearly dangerous from the name. But…
Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#5Great to see this start to show up, but it looks like it will be a while before browser support is widely distributed enough to rely on it being present: https://caniuse.com/mdn-api_element_sethtml
Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#6Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#7Great to see this start to show up, but it looks like it will be a while before browser support is widely distributed enough to rely on it being present: https://caniuse.com/mdn-api_element_sethtml
Indeed, as any browser API, it might be for in a few years (months if happy with the most recent versions), and we may have polyfills in the meantime.
Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#8Re: Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148
#9Great to see this start to show up, but it looks like it will be a while before browser support is widely distributed enough to rely on it being present: https://caniuse.com/mdn-api_element_sethtml
Indeed, as any browser API, it might be for in a few years (months if happy with the most recent versions), and we may have polyfills in the meantime.