News for hackers. Stuff that matters.
Re:Introducing command And commandfor In HTML by karol on Saturday March 08, 2025 @10:32AM (#43300963)
If these are proposals to use bindings between html attributes and calling JS methods, then it's enough to inject HTML, not JS, to start executing JS.
Re:Introducing command And commandfor In HTML by Keithamus on Saturday March 08, 2025 @01:57PM (#43302515)
It’s not executing JS. The names map to JS methods but both the HTML and JS call into C++ (or rust or swift whatever the browser is written in). Arbitrary JS code execution cannot occur. Of course if you’re ingesting user generated content you should not allow these attributes on buttons (but for proper security you should already have an allow-list of tags and attributes on any user generated content).