72
top 23 comments
sorted by: hot top controversial new old
[-] mox@lemmy.sdf.org 48 points 2 months ago* (last edited 2 months ago)

Why do I need to know all of this stuff, why isn’t the web safe by default?

The answer to questions like this is often that there was no need for such safety features when the underlying technology was introduced (more examples here) and adding it later required consensus from many people and organizations who wouldn't accept something that broke their already-running systems. It's easy to criticize something when you don't understand the needs and constraints that led to it.

(The good news is that gradual changes, over the course of years, can further improve things without being too disruptive to survive.)

He's not wrong in principle, though: Building safe web sites is far more complicated than it should be, and relies far too much on a site to behave in the user's best interests. Especially when client-side scripts are used.

[-] marcos@lemmy.world -1 points 2 months ago

Anything that didn't need that kind of security from the beginning also wouldn't break if it's built.

The stuff that would break are all vulnerable because it doesn't exist.

[-] BatmanAoD@programming.dev 21 points 2 months ago

First and foremost _____ is a giant hack to mitigate legacy mistakes.

Wow, every article on web technology should start this way. And lots of non-web technologies, too.

[-] mormund@feddit.org 17 points 2 months ago

Unless I'm missing something, the post is plain wrong in some parts. You can't POST to a Cross-Site API because the browser will send a CORS preflight first before sending the real request. The only way around that are iirc form submits, for that you need csrf protection.

Also the CORS proxy statement is wrong if I don't misunderstand their point. They don't break security because they are obviously not the cookie domain. They're the proxy domain so the browser will never send cookies to it.

Anyways, don't trust the post or me. Just read https://owasp.org/ for web security advice.

[-] mindbleach@sh.itjust.works 2 points 2 months ago

As a userscript author, it is some bullshit.

[-] milliams@lemmy.world 1 points 2 months ago

Thanks, very interesting. I'm a bit confused about what this means:

explicit credentials are unsuitable for server-rendered sites as they aren’t included in top-level navigation

What does "top-level navigation" mean here?

[-] Lysergid@lemmy.ml 1 points 2 months ago

‘’’ Note: When I say “top-level” I am talking about the URL that you see in the address bar. So if you load fun-games.example in your URL bar and it makes a request to your-bank.example then fun-games.example is the top-level site. ‘’’ Meaning explicit creds won’t be sent. Even if fun-games knows how to send explicit creds, it can’t because fun-games does not have access to creds which stored for your-bank. Say suppose your-bank creds stored in local store. Since current URL is fun-games it can only access local storage of fun-games, not your-bank.

[-] Lysergid@lemmy.ml -2 points 2 months ago

Thank you! I was always wondering why the heck this (mostly) useless and broken mechanism exists. I had hesitations about disabling it but had doubts about my understanding. Now I know I’m right

this post was submitted on 01 Sep 2024
72 points (96.2% liked)

Programming

17314 readers
132 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS