Repository navigation
Conversation
6 of 7 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Document previews and plugin viewers use the same check for which files an opened document may read.
What Changed
Replaces the document preview's duplicated path/open checks with the existing selected-regular-file authority introduced for viewer documents. Keeps preview read limits, MIME handling and its public authorization error. The filesystem provider contract gains an optional viewer-document method, so unsupported hosts can still refuse the operation.
Why
The two file surfaces should share canonical path, workspace root, symlink, regular-file and open-handle identity rules. One implementation keeps later security fixes consistent, without widening a document's authorized directories or changing a remote opcode.
Linked Issue
Maintainer-requested plugin work. Draft layer 19, based on author tooling. No new issue created.
Visual Proof
N/A — shared filesystem authorization and an optional provider contract; no renderer change.
Testing
Review
Access still belongs to the filesystem execution host. Canonical roots and file identity are checked after opening; nonblocking open refuses special files. The preview retains its established authorization error while other I/O errors remain errors. The optional method preserves old provider compatibility; no desktop fallback is introduced.
Agent skill upstream boundary
Checklist