fix(transfer): accept colon object keys on Unix destinations - #350
Merged
Conversation
Stop applying Windows filename rules to every S3 key. Traversal and control-character checks still always apply, while ':' and other Windows-reserved names are enforced only on Windows local destinations or when --portable-names is set. This unblocks Loki-style keys for mirror and recursive download on Unix. Co-authored-by: RustFS <hello@rustfs.com>
Reject colon keys under Windows-portable policy and empty or dot-only relative keys. Mark the protected cp and mirror contracts with BREAKING migration notes for the additive --portable-names flag. Co-authored-by: RustFS <hello@rustfs.com>
The previous synchronize event ran before the PR body included BREAKING. This empty commit re-runs CI against the updated description. Co-authored-by: RustFS <hello@rustfs.com>
recursive_version_removal_paginates_and_deletes_markers hit a connection-reset flake in the local HTTP mock. The previous two commits on this branch passed Test (macos-latest). Co-authored-by: RustFS <hello@rustfs.com>
houseme
requested review from
cxymds and
overtrue
and removed request for
cxymds
August 25, 2026 02:36
houseme
marked this pull request as ready for review
August 25, 2026 02:37
cxymds
reviewed
Aug 25, 2026
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.
Related issue(s)
Fixes #338
Background
rc mirrorand recursiverc object copyapplied Windows filename rules to every object key, including on Linux. A single key containing:aborted enumeration, so buckets written by Grafana Loki could not be mirrored or recursively downloaded.Root cause
Path normalization treated
:, reserved device names, and trailing dots/spaces as globally illegal. Those rules are Windows filesystem constraints, not S3 key constraints, and they ran before any destination-specific mapping.Solution
ObjectKeyPolicyinrc-core.--portable-names.:.This PR must be marked BREAKING because
docs/reference/rc/cp.mdanddocs/reference/rc/mirror.mdare protected CLI behavior contracts. The change is additive; no JSON schema or configschema_versionbump applies.Test status
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspacescripts/regression/object-key-safety.shNew coverage includes Loki-style colon keys, Windows-portable rejection of colon keys in local path mapping, empty/dot-only key rejection, CLI
--portable-namesparsing, and help-contract updates.