docs(windows): audit path normalization#3429
Merged
Merged
Conversation
Static analysis of every entry point that consumes or emits a path on Windows: CLI parsing, flist encode/decode, daemon sanitization, local- copy planning, and symlink safety. Compares against upstream rsync 3.4.1 (Cygwin build) and identifies one high-severity correctness bug (F1: backslash leaks into wire-encoded filenames) plus four lower- severity gaps. Audit-only commit; F1 fix is filed as a follow-up because it requires a wire-format change with dedicated golden tests.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Static analysis of every entry point that consumes or emits a path on Windows: CLI parsing, flist encode/decode, daemon sanitization, local- copy planning, and symlink safety. Compares against upstream rsync 3.4.1 (Cygwin build) and identifies one high-severity correctness bug (F1: backslash leaks into wire-encoded filenames) plus four lower- severity gaps. Audit-only commit; F1 fix is filed as a follow-up because it requires a wire-format change with dedicated golden tests.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Static analysis of every entry point that consumes or emits a path on Windows: CLI parsing, flist encode/decode, daemon sanitization, local- copy planning, and symlink safety. Compares against upstream rsync 3.4.1 (Cygwin build) and identifies one high-severity correctness bug (F1: backslash leaks into wire-encoded filenames) plus four lower- severity gaps. Audit-only commit; F1 fix is filed as a follow-up because it requires a wire-format change with dedicated golden tests.
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
Static-analysis audit of how oc-rsync handles Windows path inputs at every entry point: CLI parsing, flist encode/decode, daemon sanitization, local-copy planning, and symlink safety. Tracks task #1842.
Documents one HIGH-severity bug, one MEDIUM, three LOW, and one INFORMATIONAL finding.
Path-Form Map
The audit tabulates the 12 path forms a Windows user can pass on the command line and traces each through CLI parse -> wire bytes -> receiver decode -> on-disk result, comparing against upstream rsync 3.4.1's Cygwin behaviour. Forms covered:
C:\foo\bar) and drive-relative (C:foo\bar)\\server\share\foo) and verbatim long-path (\\?\C:\foo,\\?\UNC\server\share)C:/foo/bar)/cygdrive/c/foo) and MSYS (/c/foo) - oc-rsync is native Win32, so these are NOT translated.foo\bar\baz) and forward slash (foo/bar/baz)C:)Findings
transfer_role::operand_is_remoteduplicatesengine::local_copy::operand_is_remoteand lacks\\?\extended-prefix detectionname_bytes()non-Unix branch performs UTF-8 lossy round-tripstrip_leading_slashesnon-Unix branch usesto_string_lossyIn-PR Fix
None - this is an audit-only PR. The HIGH-severity finding F1 requires a wire-format change with new golden-byte tests and is filed as a follow-up. The audit document includes the full follow-up task list with severity ratings and concrete fix directions.
Test plan
cargo fmt --all(no code changes)Closes nothing yet; tracks #1842 with follow-ups.