Repository navigation
acpmux: refuse Windows device names (CON, NUL, COM1) for dropped files - #23562
Merged
Merged
Conversation
On a Windows peer `uploads\<session>\<uuid>\CON` opens the console and `nul.txt` the null device, and a trailing dot or space is dropped, yet is_file_name accepts all of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3d-4bad-7860-b096-c54282b4bec4&host=cosmic-gray
A name whose stem is CON, PRN, AUX, NUL, COM1-9, LPT1-9 (or their superscript forms), CONIN$ or CONOUT$, with any extension and in any case, or one that ends in a dot or a space, is no file name on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3d-4bad-7860-b096-c54282b4bec4&host=cosmic-gray
teamleaderleo
temporarily deployed
to
cmux-tui-merge-tree
October 21, 2026 16:41 — with
GitHub Actions
Inactive
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
|
Collaborator
Author
|
Owned by attachments-matrix on cosmic-gray · session |
1 similar comment
Collaborator
Author
|
Owned by attachments-matrix on cosmic-gray · session |
teamleaderleo
temporarily deployed
to
sentry-dsyms
October 21, 2026 16:49 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
October 21, 2026 16:49 — with
GitHub Actions
Inactive
Collaborator
Author
|
Bead |
Collaborator
Author
|
Review (independent subagent, correctness first): SHIP at 59b868b
|
teamleaderleo
had a problem deploying
to
artifacts
October 21, 2026 17:00 — with
GitHub Actions
Failure
Contributor
|
Shipped in:
|
This branch had an error being deployed
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 the person drops into a chat is saved by name under acpmux's
uploadsfolder (_acpmux/file_put, #23324). On Windows, a name such asCON,nul.txt,COM1.log,CONIN$, or one ending in a dot or a space, does not name a file in that folder: it opens a device, or the name is silently changed.is_file_namenow refuses these names on Windows, the same way it already refused\and:there.CON,PRN,AUX,NUL,CONIN$orCONOUT$is refused.COMorLPTfollowed by exactly one of1-9,¹,²or³is refused..oris refused.CONSOLE.txt,COM10,COM0,nullable.rs,aux_data.csv,LPT.Other platforms are unchanged. The check sits behind
is_file_name_for(name, windows), so the Windows rules can be tested on Linux.Testing
Focused command:
cmux-tui.ymldispatch,mode=focused. The new test ishub::file_uploads::tests::a_windows_device_name_is_no_file_name_on_windows.windows_device_name): it fails to compile becauseis_file_name_fordoesn't exist yet. The test calls the Windows rules directly, so before this change there was nothing to call.file): all fourfile_uploadstests pass, the new one included.cargo check --target x86_64-pc-windows-gnupasses (run 39633630080).Observed / Not run
redundant cloneincmux-tui-core;cmux-codex-acpgit dependency;cli::tests::action_surface_parity::pane_open_files_and_find_as_run_their_actions_with_a_path, which thefilefilter picked up.Changelog
Fixed: a file dropped into a chat on Windows can no longer be saved under a device name such as CON or NUL.
No capture: daemon-only change with no UI.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes acpmux file saving on Windows so names like
CON,NUL,COM1, or names ending in a dot or space are rejected, instead of opening a device or getting silently renamed.CON,PRN,AUX,NUL,COM1-9,LPT1-9,CONIN$, andCONOUT$with any extension, plus trailing-dot and trailing-space names.is_file_name_for(name, windows)so the Windows rules can be tested on any platform. Other platforms are unchanged.Written for commit 59b868b. Summary will update on new commits.