News for hackers. Stuff that matters.
Re:How widely used are security-based HTTP response headers? by jacquesm on Sunday August 30, 2015 @12:44PM (#10143767)
HN uses x-frame-options:"DENY" to good effect which takes care of a fair number of click-jack tricks, it also uses strict-transport-security.

But there is only so much you can do with headers, the real risks are in the documents themselves.

How about a <nojs> </nojs> pair in the primary document disabling any kind of javascript execution in the space between the tags. And those tags should only work in the primary document.

Re:How widely used are security-based HTTP response headers? by dantillberg on Sunday August 30, 2015 @12:55PM (#10143802)
> How about a <nojs> </nojs> pair in the primary document disabling any kind of javascript execution in the space between the tags.

But wouldn't folks still be able to inject scripts by just writing `</nojs><script>alert('hi')</script><nojs>`?

Re:How widely used are security-based HTTP response headers? by JoshTriplett on Sunday August 30, 2015 @12:57PM (#10143811)
CSP does exactly that; you can just ban inline scripts entirely.