Live data from Hacker News

The Native File System API allows web apps to save directly to files

web.dev

131–140 of 155 posts

Re: The Native File System API allows web apps to save directly to files

#131
post #93

Might not be appreciated opinion here but Personally, I think, the web starts to get feature parity in some way with Adobe Flash. Flash could do most of this back in the day and now the web is getting it too.

Absolutely. It feels like we're finally almost back to the level of functionality browsers had in 2010 with Flash/Java Applets.

Re: The Native File System API allows web apps to save directly to files

#132

Earlier quoted context omitted.

Sure why not, let me just create a blog post, with exact steps on how to make your windows more colorfull, and make users inject my DLLs into filesystem. The user will do exactly if i give him exact copy paste paths and commands. And voila.

You can do the same exact thing without this API, so what’s your point? How do you think most call center scams work? By asking the user to download an executable that owns their system and run it.

It's possible for this to reduce steps / make the exploit process easier, and to do so without the "download this file and run it" step that should trigger a red flag to people.

Re: The Native File System API allows web apps to save directly to files

#133
post #76

Ok, so first, tell me how to block it. Running firefox in a container?

Sounds like there's a flag in Chrome for the moment. After that, yeah some sort of container or sandbox seems like a good idea (TBH I'd argue that it's a good idea regardless of this change). I named some options at https://news.ycombinator.com/item?id=24421622

Re: The Native File System API allows web apps to save directly to files

#134

Serious question. Since this is going to be enabled by default by Chrome 86, is there any way to block Javascript from using the API? Or force it to ask for permissions? Because it seems like anything that uses the API by default has full access to my filesystem (at least based on the demo on that page). That seems insane. I don't even want anything JS-based to see my filesystem. That's a huge breach of privacy.

Not exactly what you're asking, but some thoughts:

* There is, for the moment, a flag to disable it, right?

* You could probably just have noscript/umatrix block JS outright (yes, I know this is overkill)

* Sibling comment is probably right in that Firefox is likely to not implement this immediately, if at all.

* You could also do it from the outside by sandboxing the whole browser; this is a somewhat poor mitigation (ex. leaves your Downloads directory wide open), but it could help.

Re: The Native File System API allows web apps to save directly to files

#135

We've been trialling the Native File System API in our PWA Construct 3 (a browser based game editor - https://www.construct.net ). I think it's absolutely fantastic, and users love it too - it gives them exactly what they expect from IDE-style software in the browser, such as "Save as" to any location on disk, and the ability to use folder-based projects (that are spread across multiple files). The security concerns…

> Also as noted elsewhere, existing web features already allowed reading files and even entire directories;

None of theses access are persistent though.

> the writing files part is new, and you cannot choose system directories, or ask for too much

If only that was enough.. there's plenty of important file outside of what will be defined as "system directories" by whoever define them.

I love particularly this part of the documentation:

> Another risk factor is that of ransomware attacks. The limitations described above regarding blocking access to certain sensitive directories helps limit the damage such an attack can do. Additionally user agents can grant write access to files at whatever granularity they deem appropriate.

They are perfectly aware of the risk, yet completely ignore it. At least it won't be whatever the browser define as "sensitive directories".

Re: The Native File System API allows web apps to save directly to files

#136

There is no way this isn't going to open up massive security holes. Even if the browser puts up alert after alert, people are just going to randomly click buttons and then all of a sudden wonder why some random web app is deleting all their files and adding malware. And the spec docs aren't exactly reassuring. This is an exact quote! "This API could be used by websites to try to store and/or execute malware on the us…

This is just a variation on as far as read-access is concerned. For write access, it certainly could be used to store malware on a user's system, but so can "Save As" or clicking a link with HTTP headers that triggers a download. Basically, the "Save As" dialog from browsers have the same issues. It is not downloading malware that is the issue, it's executing it. So unless you can trick the user into navigating to an…

I just went to the documentation there: https://wicg.github.io/native-file-system/

I get that from your comment you agree that this is enough to mitigate the risk they themselves bring up:

>Another risk factor is that of ransomware attacks. The limitations described above regarding blocking access to certain sensitive directories helps limit the damage such an attack can do. Additionally user agents can grant write access to files at whatever granularity they deem appropriate.

Re: The Native File System API allows web apps to save directly to files

#137
Inevitable.

I've been saying for 10+ years that browsers will integrate more and more into the OS until they become another layer that users aren't even aware of. Sort of like Electron. Imagine web apps that can render native widgets and show up in the taskbar separately.

This is just another inevitable step towards that. The only concern is how secure this will be, and from the sounds of it, the answer is not very. Still, it's inevitable that some form of this will become popular.

Re: The Native File System API allows web apps to save directly to files

#138
post #114

I'm gonna throw an unpopular opinion out there: The real issue is not that phones or browsers have too much capabilities but rather that people fundamentally don't understand how to use computers. Locking things down and removing features doesn't really solve the problem just like wrapping your child in bubble wrap before crossing the street instead of teaching it to look both ways for cars doesn't solve the problem.…

But then the solution becomes: stop using computers, because the kind of sophistication required is out of reach for a very large part of the population. So, computers will stay part of everyday life. Making the interface simple and predictable, and locking features that can be abused may be fighting the symptom, but it's better than nothing.

> Making the interface simple and predictable

Please tell me who, in the entire computing industry, is actually working on that? Because I have seen no evidence of it.

Re: The Native File System API allows web apps to save directly to files

#139
post #113
post #90

Earlier quoted context omitted.

more like "you won't have a choice but to always use the newest version of the app"

I get that you dislike electron, but that doesn't take away from the truth: don't like the latest version of an app? too bad, you just have to get used to it or stop using it

What a ridiculously user-hostile attitude. It's not about Electron, it's about the loss of control. It's one of the big problems with any sort of forced-update software delivery: Web apps, SaaS, snaps, etc. The new version drops a feature I need? "Too bad." The new version doesn't work right on my computer? "Too bad." The new version has a bug that is blocking my work? "Too bad."

Re: The Native File System API allows web apps to save directly to files

#140
post #114

I'm gonna throw an unpopular opinion out there: The real issue is not that phones or browsers have too much capabilities but rather that people fundamentally don't understand how to use computers. Locking things down and removing features doesn't really solve the problem just like wrapping your child in bubble wrap before crossing the street instead of teaching it to look both ways for cars doesn't solve the problem.…

But then the solution becomes: stop using computers, because the kind of sophistication required is out of reach for a very large part of the population. So, computers will stay part of everyday life. Making the interface simple and predictable, and locking features that can be abused may be fighting the symptom, but it's better than nothing.

Well yeah, I agree but even in the most locked down system people will still (involuntarily) find ways to get screwed or otherwise not be able to discern what's good and what's bad for them.

It sounds a bit nuts and I'm being slightly hyperbolic on purpose but I think the way to go is to slow digitalization in the public (i.e. our everyday lives) down a bit and properly educate at least decision makers, children (or young adults) and teachers about how this sorta stuff really works and how their rights are being undermined in the digital world.

Alas, the pandemic has been a big blow to that as well.

Post reply on HN