Repository navigation
[Website] Reject OPFS root and sites-directory mounts - #4533
Merged
Merged
Conversation
Contributor
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
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.
Reject OPFS source paths
/and/sitesin both startup mounts and latermountOpfs()calls. These mounts expose every saved site at once. Empty paths and alternate slash spellings are rejected too.Individual site folders, custom integration folders,
local-fshandles, and PHP destination paths stay unchanged. The site manager can still list saved sites directly.This breaks callers that mount either source root. It does not block mounting a known site folder or change ZIP exports.
Testing
All 141 remote tests, lint, type checks, and the split-origin build pass. Five Chromium UI checks pass for saving, reopening, renaming, site switching, and local-folder saving.
To check manually, save a temporary Playground, reload it, switch away and back, and save another to a local folder. Try mounting
/and/sites; both should reject, while a specific site folder still mounts.Summary by CodeRabbit
/sitesare now rejected during startup, with a clear error message. This prevents invalid mount locations from proceeding to storage access or installation. Other supported OPFS paths and local-folder mounts continue to work as before.