9 ms·
> This should be better from a privacy standpoint since files stay completely client-side, but CORS difficulties… Isn’t this privacy tradeoff directly at odds
by haswell 4y ago
> This should be better from a privacy standpoint since files stay completely client-side, but CORS difficulties…
Isn’t this privacy tradeoff directly at odds with security? i.e. local access would also open the door to malicious sites accessing the local file system?
I can understand the dev-time frustration with CORS, but removing it just reintroduces a whole category of security issues.
Maybe there is something better, but whatever replaces it would need to include similar restrictions.
- alwaysthevictor 4y ago>Isn’t this privacy tradeoff directly at odds with security? i.e. local access would also open the door to malicious sites accessing the local file system? Look at docker for analogy. Sometimes you just need a volume to use locally, but you don't necessarily need to access files that already exist. Consider the use cases of /tmp/ as well, for instance.
- haswell 4y agoThis sounds unrelated to the use case described by the parent, in which they want to serve specific files that exist. But setting that aside, bypassing CORS to achieve this seems analogous to unlocking your front door/gate before leaving for the day in order to grant access to a delivery driver. It’ll work, and the driver can deliver your package, but it’ll also let random and potentially malicious passers-by into your home without restriction, so who knows if your home will be intact when you return. A theoretically functional solution that doesn’t really work in the real world. Some other solution that behaves more like a temporary file store sounds better, but the tradeoff I mentioned is specifically about CORS.
- Lalabadie 4y agoDefinitely at odds with having a most secure default, yes.