Live data from Hacker News

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

web.dev

31–40 of 155 posts

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

#31
post #26

> Chrome 86 Enables the Native File System API by Default Not only is this not the source title, but this information nowhere in the linked article. It's true , but the linked article only very indirectly suggests the possibility in that the most recent origin trial ends in Chrome 85. The Chromium blog post on 86 does indicate this directly: https://blog.chromium.org/2020/09/chrome-86-improved-focus-h...

There's some things in 86 that are even more interesting imo, mainly FTP support is finally being removed. Crazy that something so integral to the early web is now not even worth supporting in the browser.

Hmm. I used ftp in the browser yesterday. We have a large forest fire here which led me to look at detailed maps the incident team produce showing burn boundaries etc. These are published via ftp.

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

#32

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…

Do we need to just create a dummy proof OS for people that are oblivious and click yes to everything? Otherwise, why not give people choice? I mean you could create a pop up asking people for their passwords today on any browser, so how is adding a feature that requires permission any different?

Not dummy proof, just normal human proof. It’s very easy to condition someone to click a yes button when it stands between them and whatever task they’re actually trying to accomplish.

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

#33

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 existing binary that is normally executing on the system, and have the rights to replace it, executing is not any different that triggering the user to put something in his ~/Download directory and asking him to paste a shell command.

The API doesn't not provide a way to mark something executable, and it should block you from obtaining write access to any file already marked executable just like many mobile OSs don't let you simultaneously mark a page in memory as writable and executable.

The last one looks like a flaw, I couldn't find anything in the spec that says "thou shalt not let the user open a file marked executable for write access", although it does suggest banning access to stuff like C:/Windows, /usr, /Applications, etc.

But what really bothers me is people making uninformed comments. Rather than knee jerk trigger anytime any browser API is changed without fully reading the spec and then actually pointing out any weaknesses, we get the same low signal commentaries.

So again, browsers already allow unaware users to be tricked with bog standard fileupload form elements and Save As dialogs. This just breaks a hardcoded high level UI into smaller reusable parts, and it actually adds more concerns over security than the original 1997 spec for file upload and save.

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

#34
post #6

Earlier quoted context omitted.

Not sure why you would say that. Maybe try some vscode extensions such as "Markdown Preview Enhanced" or "Markdown All In One"? Those works both offline and local.

VS Code sucks and if I were to go the route of a different app there are lot better options out there for markdown editing. This feature has a lot of amazing potential, but some people like the Apple-model so much that they'd prefer only being told what they are allowed to do.

[deleted]

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

#35

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…

BTW, for anyone who has children who are doing distance learning during COVID, the vast majority of school districts are using the Web, not native apps on desktop or iOS for the kids to do collaborative learning and submit work.

From what I've seen, they're basically creating APIs like this that set on top of GDrive, DropBox, and File Upload / Server-directed File-Save. So in essence, all this new API is mostly buying you is offline mode.

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

#36
post #6

Earlier quoted context omitted.

Not sure why you would say that. Maybe try some vscode extensions such as "Markdown Preview Enhanced" or "Markdown All In One"? Those works both offline and local.

VS Code sucks and if I were to go the route of a different app there are lot better options out there for markdown editing. This feature has a lot of amazing potential, but some people like the Apple-model so much that they'd prefer only being told what they are allowed to do.

    This feature has a lot of amazing potential
Lots of potential for abuse, especially. Any API introduced into an industry-controlling browser granting too many local privileges seems absolutely wild given that the Internet's full of people trying new and creative ways to scam, hack, or otherwise inconvenience end users.

As someone with professional experience in web security, this API is like a nightmare come true.

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

#37

> Chrome 86 Enables the Native File System API by Default Not only is this not the source title, but this information nowhere in the linked article. It's true , but the linked article only very indirectly suggests the possibility in that the most recent origin trial ends in Chrome 85. The Chromium blog post on 86 does indicate this directly: https://blog.chromium.org/2020/09/chrome-86-improved-focus-h...

Thanks. I've changed the title to the article's subtitle (shortened to fit HN's 80 char limit), since the subtitle is a bit more factual than "simplifying access to local files".

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

#38

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…

Do we need to just create a dummy proof OS for people that are oblivious and click yes to everything? Otherwise, why not give people choice? I mean you could create a pop up asking people for their passwords today on any browser, so how is adding a feature that requires permission any different?

You don't always have to be a dummy to act stupid: https://en.m.wikipedia.org/wiki/Dark_pattern

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

#39

It seems like I can replace an Electron app which only needs (a part) of File System access to browser.

Which app is it?

It is a simple music player specifically made for playing music from osu! (https://osu.ppy.sh/).

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

#40
post #26

> Chrome 86 Enables the Native File System API by Default Not only is this not the source title, but this information nowhere in the linked article. It's true , but the linked article only very indirectly suggests the possibility in that the most recent origin trial ends in Chrome 85. The Chromium blog post on 86 does indicate this directly: https://blog.chromium.org/2020/09/chrome-86-improved-focus-h...

There's some things in 86 that are even more interesting imo, mainly FTP support is finally being removed. Crazy that something so integral to the early web is now not even worth supporting in the browser.

s/worth supporting in the browser/something Google wants you using/
Post reply on HN