Re:Why do we have both CSRF protection and CORS?
by 1oooqooq on Sunday March 02, 2025 @03:40PM
(#43234821)
there are so, so, so many ways to read this data back it's not even fun.
[ Parent
| on HN ]
Re:Why do we have both CSRF protection and CORS?
by Muromec on Sunday March 02, 2025 @04:00PM
(#43235026)
There are ways, but they generally need a cooperation of both sides of the inter-domain boundary. What you generally can't do is make arbitrary reads from the context of other domain (e.g. call GET on their api and read a result) into your domain without them explicitly allowing it.
Re:Why do we have both CSRF protection and CORS?
by duskwuff on Sunday March 02, 2025 @04:04PM
(#43235066)
Right. What you can sometimes do is observe the effects of the content being loaded, e.g. see the dimensions of an image element change when its content is loaded.
Re:Why do we have both CSRF protection and CORS?
by RandomDistort on Sunday March 02, 2025 @04:15PM
(#43235194)
Is there some document somewhere that lists all the potential ways of doing stuff like this?
Re:Why do we have both CSRF protection and CORS?
by Herrera on Sunday March 02, 2025 @05:30PM
(#43235954)
Yeah, https://xsleaks.dev tracks most of the known ways to leak cross-origin data.
Re:Why do we have both CSRF protection and CORS?
by smagin on Sunday March 02, 2025 @05:58PM
(#43236174)
oh hell yes. And oh yes iframes and postmessages, of course people would setup them incorrectly and even if they do some (probably not that important but still) data will leak if you're creative enough. Thanks for the link!