Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support seeking past the end of a file in the File System Access API #600

Closed
1 task done
mkruisselbrink opened this issue Jan 22, 2021 · 6 comments
Closed
1 task done
Assignees
Labels
Progress: propose closing we think it should be closed but are waiting on some feedback or consensus Resolution: satisfied The TAG is satisfied with this design Review type: small delta Topic: Filesystem Venue: WICG

Comments

@mkruisselbrink
Copy link

HIQaH! QaH! TAG!

I'm requesting a TAG review of seeking past the end of a file in the File System Access API.

Rather than rejecting when trying to write past the end of a file this
changes the File System Access spec to require extending a file with 0 bytes
instead.

Further details:

  • I have reviewed the TAG's API Design Principles
  • Relevant time constraints or deadlines: We hope to ship this change in Chrome 90, branching at the end of February
  • The group where the work on this specification is currently being done: WICG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): unknown
  • Major unresolved issues with or opposition to this specification:
  • This work is being funded by: Google

We'd prefer the TAG provide feedback as (please delete all but the desired option):

💬 leave review feedback as a comment in this issue and @-notify @mkruisselbrink

@kenchris kenchris self-assigned this Jan 23, 2021
@torgo torgo self-assigned this Jan 26, 2021
@torgo torgo added the Progress: propose closing we think it should be closed but are waiting on some feedback or consensus label Jan 26, 2021
@kenchris
Copy link

@torgo and me looked at this in our TAG Virtual F2F breakout today.

Thank you for demonstrating the developer interest. The feature seems very sensible to us and we are supportive.

@torgo torgo added this to the 2021-01-25-F2F-Q'onoS milestone Jan 26, 2021
@kenchris
Copy link

From Blink-Dev:

Daniel Bratell:

Just curious, what happens if someone tries to exploit this by writing
very far ahead?

Austin Sullivan:

Great question, Daniel. This was brought up in the GitHub issue which requested this feature (WICG/file-system-access#262 (comment)). I'll quote the response by mek@:

Behavior wise it should be no different than calling truncate with a very large size to resize the file. For files in the origin private file system either operation will fail with a quota exceeded error (since the empty space is still counted against quota). For files on the local file system, I imagine it does indeed depend on the underlying file system implementation. It is my understanding that pretty much every major file system today supports sparse files transparently (ntfs, apfs, and most linux file systems), although I haven't tested how exactly they behave. I don't think this will reveal more of the underlying system then other operations already do.

@torgo
Copy link
Member

torgo commented Feb 16, 2021

It feels to me like this needs to be spelled out in the explainer and in the spec - in a privacy & security and mitigation section maybe - considering the parallels to similar exploits in other contexts.

@mkruisselbrink
Copy link
Author

I agree that it would be good to mention something in the security considerations section around filling up storage. I filed WICG/file-system-access#277 to track that.

@mkruisselbrink
Copy link
Author

Proposed text in WICG/file-system-access#278

@torgo
Copy link
Member

torgo commented Feb 17, 2021

Thanks @mkruisselbrink - given that I think we are done here and this looks like a good result. Thanks! Dan

@torgo torgo closed this as completed Feb 17, 2021
@torgo torgo added the Resolution: satisfied The TAG is satisfied with this design label Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: propose closing we think it should be closed but are waiting on some feedback or consensus Resolution: satisfied The TAG is satisfied with this design Review type: small delta Topic: Filesystem Venue: WICG
Projects
None yet
Development

No branches or pull requests

4 participants