Repository navigation
Conversation
buzz upload file and buzz messages send --file only accepted jpeg, png, gif, webp and mp4, while the relay refuses only active web content and native executables and stores un-sniffable files as application/octet-stream. An agent therefore could not attach a document it had written: .md, .txt and .json all failed with 'unsupported file type'. Replace the allow-list with the relay's deny-list, carry the original file name into the imeta tag (NIP-92 filename, which the Desktop already writes and reads), and link non-media attachments as [name](url) instead of an image embed. One line in the ACP base prompt tells agents that --file exists. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: trialismm <[email protected]>
🔐 Codex Security Review
|
Author
|
Closing this — I'm no longer maintaining my fork. Thanks for taking a look! |
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.
Problem
buzz upload fileandbuzz messages send --fileaccept only jpeg, png, gif, webpand mp4 (
ALLOWED_MIMESincrates/buzz-cli/src/client.rs). The relay accepts muchmore:
buzz-media::validationrefuses only active web content and nativeexecutables, and stores anything without magic bytes as
application/octet-stream(its own test asserts plaintext is accepted that way).
The practical effect is that an agent cannot hand a document back to the people it
works with. Ask an agent for a written deliverable and it writes the file, then
cannot attach it:
We watched an agent try
.md, copy it to.txt, then.json, and finally give upand paste an 18 KB document into the message body.
Change
upload_mime_for()replaces the allow-list with the relay's deny-list (mirroringBLOCKED_FILE_MIME_TYPES): text, PDFs, archives and the rest upload, whileexecutables and active web content are still refused client-side.
BlobDescriptorgainsfilename, set from the uploaded path, andbuild_imeta_tagemitsfilename <name>— the NIP-92 field the Desktop alreadywrites and reads for generic attachments.
buzz messages send --filerenders a non-image/video attachment as[name](url)instead of, matching the Desktop.buzz upload filenow printsfilenamein its JSON descriptor when known(omitted otherwise) — additive, existing parsers are unaffected.
Size caps are unchanged (50 MB, 500 MB for video); the constant's doc comment was
reworded because it is no longer image-only.
Tests
upload_mime_testsinclient.rs: plaintext sniffs toapplication/octet-stream,PNG magic bytes to
image/png, a PE header is refused; the imeta tag carries thefilename and mime.
Manual test
The Desktop renders a named download link and the file opens.
Note
One line in
crates/buzz-acp/src/base_prompt.mdtells agents that--fileexists —without it they keep pasting documents into the message body, which is the behaviour
this fixes. Happy to split that out if you would rather keep the prompt separate.
🤖 Generated with Claude Code