2 ms·
A web browser is different than a native app, because simply clicking a link can execute code from an untrusted party. First of all, when you are using a web b
by jrochkind1 7y ago
A web browser is different than a native app, because simply clicking a link can execute code from an untrusted party.
First of all, when you are using a web browser, if it wasn't for cross-browser request restrictions, code executing on one site (or web app) would be able to _use credentials stored in cookies_ by another site altogether. Because all these web apps exist in the same browser context. Native apps are all separate, code running in an Native App A can't say "make a request to facebook using the credentials the user already logged into in the facebook app." But Web App A could do exactly that with the credentials the user logged into on facebook.com -- if it wasn't for cross-browser request restrictions. Which then CORS let some sites carefully opt out of.
Secondly, when you download an app, you are trusting the developers of that app.
You navigate the web, you are trusting every single site you visit (to also not have their own code injection or other vulnerabilities to which web pages/apps are particularly vulnerable to), and most users have no idea what sites they are visiting, they are just clicking links.
What we really need a more clear explanation of the CORS threat model, with examples. I think we'd all be more clear about what it's for and why we need it if we understood it better.
It is definitely a developer UX issue, but it is sadly one that is baked into the web for legacy reasons.