Repository navigation
Conversation
A file relayed from the Mac was saved into Downloads without the mark AirDrop had put on it, so SmartScreen, Office Protected View and Gatekeeper never checked it. The receiver now marks it before it gets its final name: Zone.Identifier (zone 3) on Windows, com.apple.quarantine on macOS, with MagicInput as the agent so the AirDrop relay doesn't send it back. If the drive can't hold the mark the file is still saved, with a warning in the log. No protocol change; only the receiving computer needs the update. Co-Authored-By: Claude Fable 5.2 <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
A file AirDropped to the Mac and relayed to the other computer was saved into Downloads without the "came from another device" mark AirDrop had put on it, and the marked original on the Mac is deleted after the transfer. So SmartScreen, Office Protected View and Gatekeeper never checked it. This is the open finding from the security review on #9 (#9 (comment)).
The receiver now marks the file itself, before it gets its final name:
Zone.Identifierstream withZoneId=3.com.apple.quarantineset to0081;<time>;MagicInput;. The agent is MagicInput and notsharingd, so the AirDrop relay on a receiving Mac doesn't treat the file as a new AirDrop and send it back.Everything that arrives on this path is an AirDrop from the other computer, so the receiver can always mark it. That keeps the change to
receive_fileinsrc/net.rswith no new message field.If the mark can't be written (a Downloads folder on exFAT or FAT32), the file is still saved and the log gets a warning. Refusing the file would break a relay that works today.
User-visible behavior
Validation
cargo test --lockedon macOS: 20 passed.file_travels_in_pieces_and_lands_under_a_free_namenow does a loopback transfer and reads the mark back from the saved file under its final name (photo (2).heic), on both systems.NSURLQuarantinePropertiesKeyreturns agent "MagicInput" for a file marked with the same string.cargo clippy --all-targets --locked: the same 4 warnings as main.cargo check --target x86_64-pc-windows-gnu --all-targets --locked: passes with no warnings.windows-latestin CI on this PR.Risk
PROTOCOL_VERSION?): None. Only the computer that receives the file needs this version; a PC on 0.6.2 keeps saving unmarked files.CHANGELOG.mdonly (each adds an Unreleased section).src/net.rsmerges cleanly with Harden device pairing #16, and the merged tree passescargo test --lockedon macOS (26 passed) andcargo check --target x86_64-pc-windows-gnu --all-targets --locked.🤖 Generated with Claude Code