News for hackers. Stuff that matters.
Re:Ask HN: What prevents the following vulnerability I found... by p_ing on Monday January 20, 2025 @05:31PM (#42773880)
CORS policy would say "okay end user, you can load everything from me, but also get jquery from <some jquery CDN>. no resources can come from anywhere else".

It's not a bad idea to just put in a CSP (always put in a CSP!), CORS policy, and Same-Origin. This is configured on your app rather than server (usually).

MDN is one of the better resources for this, and links out to other authoritative resources in the additional info section of a directive.

Re:Ask HN: What prevents the following vulnerability I found... by vitalipom on Monday January 20, 2025 @05:39PM (#42773950)
Okay, I’ll give it a try by mocking up an attack on a secure app of mine I’m making. Thanks!!!