Repository navigation
Send several files with one code and unpack them on receive - #39
Merged
Merged
Conversation
A multi-file send already travelled as one .zip. Mark that zip as a bundle in the offer, so `cdx receive` and the browser Receive box unpack it and each file arrives separately, with folders kept. - cdx receive: unpacks into --out (created if missing) or the current folder, refuses name clashes without --force, and never extracts a path that escapes the folder. A failed unpack keeps the zip. - browser: lists each file with its own download link and downloads them one after another; falls back to the zip if it cannot read it. - Receivers that predate the bundle marker still get the .zip. - Agent sharing docs say to pass all files to one `cdx send`. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
A folder plus a file now arrives as separate files instead of one zip, so the browser check asserts each file's download rather than the archive name and contents. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Bundle receives built file paths from the sender's offered name, which CodeQL flags as uncontrolled path data. The zip now uses a fixed name in the output folder, so the sender's name is only shown in messages. verify:browser now checks that a multi-file send unpacks into separate files instead of asserting a zip. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
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
.zipthe receiver had to unpack by hand.cdx receiveunpacks into--out(created if missing) or the current folder, keeps folder structure, and refuses name clashes unless--forceis given. A bad archive is kept as a zip so nothing is lost.bundlemarker still get the.zip, so older clients keep working.cdx sendrather than zipping them first.Testing
go test ./cmd/cdxpasses, including new tests for unpacking, unsafe names, and clash handling.node --test src/*.test.jspasses (51 tests), andvite buildsucceeds.scripts/verify-multi-file.mjspasses against a local relay in both directions:cdx send→ browser, and browser →cdx receive.Notes
--resumablesends still allow only one file.🤖 Generated with Claude Code