Repository navigation
Feat/confined upload - #63
Merged
Merged
Conversation
gogoogle v0.14.0 uploads and updates from an io.Reader, and oscompat v0.11.0 opens a file inside a root with the open itself confined and caps the read. Refs: RMI-MCPGOOGLE-008 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e and stream them upload_file and update_file resolved the path inside the upload root and then let gogoogle open it again, so a link swapped in between the check and the open was followed, and a file that grew after the size check was sent whole. The file is now opened once, through oscompat's confined open, which refuses a link that leads out of the root at the moment of the open. The handle is checked as a regular file within the limit, and that handle is streamed to Drive with the read capped at the limit, so a file that grows is cut off and refused as file_too_large. A link with an absolute target is refused even when it points back into the root, since the confined open does not follow absolute links. Refs: RMI-MCPGOOGLE-008 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cover a file that passes the size check and then grows past the limit, and is cut off before it reaches Drive. Cover a link swapped in at the path after the open, which is never followed because the handle that was opened is the one sent. Cover a link with an absolute target, refused even inside the root, and a relative one, followed. Refs: RMI-MCPGOOGLE-008 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ed file links Explain that the file is opened once and the handle streamed, that a file which grows past the limit is refused as file_too_large, and that a link with an absolute target is refused. Say that file links must be on drive.google.com or docs.google.com, and list oscompat among the key dependencies. Refs: RMI-MCPGOOGLE-008 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: RMI-MCPGOOGLE-007 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
No description provided.