• 2 Posts
  • 355 Comments
Joined 3 years ago
cake
Cake day: August 17th, 2023

help-circle





  • Yeah, Chromium’s implementation is IMO very elegant and genuinely improves security for most people. That’s why I’m a little miffed by comments that paint it as an obviously terrible feature, just like happens with the “read/write to a specific local folder” API.

    These days, new browser features often aren’t in the users best interest, I understand and share the commonly discussed concerns on those. But compared to the alternatives, these specific APIs genuinely improve safety for most users AND make things more accessible for newbies and pros alike. Blocking them on principle (& without specific technical concerns) will not protect users when their remaining option gives malicious actors far more access without any exploits!


  • I do understand your concerns regarding safety, but not having WebUSB does not guarantee that malicious websites can’t access your USB devices. Both Firefox and Chromium already interact with your USB devices to provide features like debugging over USB, so malicious websites that exploit browser bugs are able to talk to your devices either way. And if we don’t count browser bugs, you can simply set your browser to block WebUSB by default to arrive at the same outcome.

    Of course there is a chance that specific exploits could work in one case and not the other, but that’s something the real-life statistics haven’t shown to be an issue so far. Browsers are generally pretty safe these days due to multiple layers of sandboxing, so I’d be surprised to see major WebUSB-specific security exploits appearing in the future.


    Edited to add:

    Sorry, when I said “sky is falling” I meant a general erosion of user security and privacy, when using our “own” devices.

    Same here, I hate the direction things are already clearly heading towards on mobile, and I expect desktops to get enshittified as well soon enough. But I see WebUSB as a major positive in that context (since it allows users to take control of their devices in a much easier and safer manner, & mostly guarantees backwards compatibility of such tools for many years to come). And although I’ve read comments similar to yours many times - this topic gets brought up fairly often - nobody has explained concrete technical issues that are likely to bite us.


  • I’m afraid of the sky falling (it is).

    Somehow, I must’ve missed all these cases where bad actors abused the WebUSB API. So what did they do? What’s the worst damage the victims have suffered?

    That’s general - in this specific case, by my reckoning, it can never be safe for a website to understand, in any depth, the hardware of the machine requesting it.

    You still haven’t explained: why? When the options are “website” or “untrusted binary”, the website is objectively much safer. Sure, you can sandbox untrusted binaries - but then you can just sandbox the browser.

    Yes, there are security concerns, but these fears haven’t been confirmed in real life, and they don’t disappear if we ban WebUSB! Instead, people have to run untrusted code with access to far more hardware than WebUSB allows.






  • As a passionate Golang hater, I can gladly explain!

    • It’s not just the repeated if err != nil, even though that’s already bad enough. But the really fucked up part is the := bullshit. It makes moving code around unnecessarily annoying, and it’s telling that few other languages share Golang’s approach.
    • The lowercase/uppercase rules for private/public stuff is theoretically not a horrible idea, but it makes the code look much more inconsistent. I find _ much easier to read, and this leaves upper/lower to signal other details. But I see that this is mostly personal preference.
    • Fairly basic operations take much, much more code than they should (e.g. deserializing JSON while handling extra args, or basic functional operations - though that should change sooner rather than later with the new generic methods, right?)
    • The decision to initialize every non-pointer primitive with the “bottom value” (or whatever it’s called again) makes sense in isolation, but it’s really unfortunate that they don’t support additive types, because this means a bunch of common tasks need to use pointers, and unfortunately the type system is worthless when it comes to preventing segfaults caused by bugs with pointers.
    • I find that most Go libraries have basically no documentation, if you’re lucky you get an example that might vaguely be related to whatever you want to know. I’ve had much better experiences in other languages.

    All in all IMO most Go code is 5x longer than necessary to actually express itself in a readable manner, all because the language still doesn’t have proper error handling or generic support (until recently at least). At the same time it’s fairly inflexible, the type system is still shallow and basic, and it’s still way too easy to shoot yourself in the foot.

    The only good thing Go has going is the single file deployments, but I’ll gladly spend one hour of every remaining day of my life setting up containers, if it means I never have to touch anything Go again.