Hacker Newsnew | past | comments | ask | show | jobs | submit | Banou's commentslogin

In the case of password managers, amy decent one will put their DOM elements in a closed shadowDOM root, which prevents the page scripts from interacting with it entirely.


Shadow DOM is not a security boundary, and can be bypassed.


I didn't go into full details but it's usually a combination of shadowDOM plus Iframe for the security boundary


This is correct, I just checked with Bitwarden. They use an iframe with the extension's src, nested within a closed shadow DOM. I was not able to get any data from the extension's iframe, although the site can still detect the specific extension is in use which could be used for fingerprinting.

From a page, which loads after the extension? How?


>The {mode: "open"} argument gives the page a way to break the encapsulation of your shadow DOM. If you don't want to give the page this ability, pass {mode: "closed"} instead, and then shadowRoot returns null.

>However, you should not consider this a strong security mechanism, because there are ways it can be evaded, for example by browser extensions running in the page. It's more of an indication that the page should not access the internals of your shadow DOM tree.

https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...

This presentation talks about using window.find() and other methods:

https://speakerdeck.com/masatokinugawa/shadow-dom-and-securi...


1. Correct. Open is peekable, closed is not.

2. Extensions can do whatever the user lets them. A web page however can not access a content script closed shadow root

3. Prototype pollution also cannot occur since content scripts run before the page

4. Window.find() also does not work if you run the content script in an isolated world, as you should.

If you do all of the above, a web page cannot access data from your content script closed shadow root.

Browser extensions can. Running untrusted browser extensions is extremely dangerous.


So just to make sure I understand this correctly, if you follow all the above precautions, another browser extension could still nab your data?

Not extension to extension. As in not your extension data, unless you allow messages and don’t sanitize it properly.

But content scripts? Yes. Browser extensions can call shadowDom openOrClose to read all shadow dom nodes


> Perhaps you can think of a way to design an alerting system which cannot be abused - but I can't.

Isn't the obvious answer decentralization? Have persons necessary to send that message in different places across the country/outside the country needing to sign it for it to be sent. All taking the responsibility of following protocol in these cases.


I’d go further, and predefine the available messages and bake them in - $place is {under attack|on fire|underwater|beset by the whooping palsy} etc. - and then the decentralised send no longer needs distribution of a message, just an ID and enumerated metadata, like location.

Then the men with guns come and you can earnestly say “well guys, i know you want to declare the eternal republic of Basingstoke, but all I can do is send a warning about a tornado in Slough, is that close enough?”


That works until you have a sudden and unexpected situation such as "There is an epidemic of black death, please remain indoors" which you didn't account for, and now you have to tell everyone that the country has been beset by the whooping palsy instead and hope the intent comes through


I think that is right and with the way Ukraine and Iran is going, we will need smaller decentralised data centres etc too. Its coming from a sad, bad place but it may be better and more democratic, less centralised.


Like if cloudflare and other protection services don't make the web more human-hostile blocking un-approved browsers and tools like cURL. Captchas and others already get solved by AIs nowadays, they're just friction done to collect labeling data for free from users...


Good thing most websites already moved away from Google's recaptcha.


Temporal is nice but I've tried using it and had terrible performances. Hope the implementations get better in the future.


Have tried almost every PaaS and same for me, I always come back to CapRover, it's the platform I've had the less issues with, it's simple and yet feature complete enough for me to run almost anything. I'd love a better alternative if possible.


React in itself isn't that heavy, and things like preact exists if you want an even lighter library, it's mostly other dependencies that are heavy, so the blame is mostly on the side of the devs, not react, for having heavy and clunky software.


https://krausest.github.io/js-framework-benchmark/current.ht...

Select all angular, leptos, vue, solid and react variants -> react literally is consistently the slowest


Good thing that 99% websites don't need to modify 1k dom elements every seconds then, if you do using a DOM library isn't the right choice. My comment was about size library, in response to the parent comment about MBs of js. I'd gladly take a 10ms slower update on 1k rows(that practically never happens, ever heard of virtual lists?) for a maintainable codebase any day.


Any plans to expand further than Hetzner? They're pretty restrictive on certain usages(e.g VPNs), I'd be really interested in support for Datapacket for example.


Based on their stunningly hilarious "API"(sic), unlikely; their "create a server" mutation doesn't even support any user data https://api.datapacket.com/#definition-ServerInput


Was innitially designed for Hetzner, but they way it has been bult, will allow expanding to any provider. Especially to providers that offer their own Kubernetes distribution.


Thats such a political argument, this is ecology, your POV on origins isn't correct in this case. Introducing a new species that has never lived somewhere could maybe introduce really bad side effects? Imagine a new predator that somehow eats everything and reproduce 10x more than any other species in the introduced ecosystem, causing it to simply be destroyed? Same goes with plants, why do you think airports prevents you from importing fruits and seeds? Because they could cause irreversible damages. You can Google tons of cases of invasive insects being mistakenly imported being a bane to farmers and the like.


> Imagine a new predator that somehow eats everything and reproduce 10x more than any other species in the introduced ecosystem, causing it to simply be destroyed?

Like Homo Sapiens ? /s


But chatgpt wasnt the first, openai had coding playground with gpt2, and you could already code even before that, around 2020 already, so I'd say it has been 3-4years


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: