Skip to content

feat: sync_to subdir with spaces/metacharacters via rsync -s (#12 item 2) - #17

Merged
thorwhalen merged 2 commits into
masterfrom
feat/subdir-protect-args-12
Oct 13, 2026
Merged

thorwhalen merged 2 commits into
masterfrom
feat/subdir-protect-args-12

Conversation

@thorwhalen

@thorwhalen thorwhalen commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Item 2 of #12. subdir outside [\w./@%+=:,-] was always refused (old rsyncs split the remote path in a shell). With local rsync >= 3.2.4 (local_rsync_version()) such a subdir is now sent with -s; control characters and rsync wildcards (* ? [ ]) are still refused; older rsync keeps the ValueError (naming the version). Plain subdirs are unchanged.

Adversarial review (Opus): confirmed a regression that reopened the #13 symlink escape: with the charset relaxed, subdir='ln[k]'/'*' passed the check on the literal name and the remote rsync expanded the glob through a link; fixed by refusing wildcards (regression tests with an outside symlink). Also fixed: v3.2.7-style version strings, a failed version probe being cached forever. Refuted: injection via ;, $(), backticks, quotes, leading -, :, .. through globs, backslashes. Real-sshd tests for my dir, a;b $x, quote'd, non-ASCII.

Item 1 of #12 stays blocked on a dol scope probe (i2mint/dol#122); item 3 is #16. #12 stays open for item 1.

🤖 Generated with Claude Code

thorwhalen and others added 2 commits October 13, 2026 11:16
…3.2.4 (-s) (#12)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…past the confinement check); don't cache a failed version probe

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thorwhalen
thorwhalen merged commit 9be9399 into master Oct 13, 2026
8 checks passed
@thorwhalen
thorwhalen deleted the feat/subdir-protect-args-12 branch October 13, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant