Repository navigation
fix: refuse writes on read-only servers when the file is opened - #2
Merged
Merged
Conversation
GET /sftp/v1/servers now marks each server with the API's write decision. On a server marked write: false, open-for-write, mkdir, rename and remove fail with permission denied before reaching the API, so a read-only user's upload fails at open instead of at close (Gameplane spec 040, US2 scenario 3). A missing field leaves the decision to the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary
A user with only
servers:readcould open a file for writing on a server; the upload was refused only at close, when the API rejected the stream. Gameplane spec 040 (US2 scenario 3) wants "permission denied" for the operation itself, and the Gameplane E2ETestSFTP_Lifecycle/read-only-permission-matrixchecks thatCreatefails.GET /sftp/v1/serversitems now carrywrite, the API's file-access decision (Gameplane PR #1074 adds it).write: false, open-for-write, mkdir, rename and remove return permission denied before any request reaches the file routes.specs.mddocuments the field.Tests
New
internal/vfs/readonly_test.go: tree and per-server logins refuse open-for-write and mkdir on a read-only server without touching the stream route; writable servers and servers without the field still accept writes. Existing tests unchanged.Shipping
Merge this, then the
sftppointer bump goes into Gameplane #1074 together with the API side.Generated by Claude Code