News for hackers. Stuff that matters.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by goatlover on Tuesday February 24, 2026 @10:39AM (#47138512)
Any potential reader should be familiar with innerHTML.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by kennywinker on Tuesday February 24, 2026 @11:11AM (#47138867)
Right. Like how any potential reader is familiar with the risks of sql injection which is why nothing has ever been hacked that way.

Or how any potential driver is familiar with seat belts which is why everybody wears them and nobody’s been thrown from a car since they were invented.

Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by orf on Tuesday February 24, 2026 @11:34AM (#47139144)
yes, and bugs shouldn't exist because everyone should be familiar with everything.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by croes on Tuesday February 24, 2026 @12:43PM (#47140075)
But if some are marked unsafe and others are not it gives a false sense of security if something is not marked unsafe.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by orf on Tuesday February 24, 2026 @12:45PM (#47140097)
So we shouldn’t mark anything as unsafe then? And give no indication whatsoever?

The issue isn’t that the word “safe” doesn’t appear in safe variants, it’s that “unsafe” makes your intentions clear: “I know this is unsafe, but it’s fine because of X and Y”.

Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by croes on Tuesday February 24, 2026 @01:23PM (#47140644)
Maybe we should add the word safe and consider everything else as unsafe
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by orf on Tuesday February 24, 2026 @02:07PM (#47141229)
Like life, things should default to being safe. Unsafe, unexpected behaviours should be exception and thus require an exceptional name.

Legacy and backwards compatibility hampers this, but going forward…