diff options
author | Wayne Davison <wayne@opencoder.net> | 2022-01-09 17:35:39 -0800 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2022-01-09 17:47:24 -0800 |
commit | 6b8db0f6440b28d26ef807d17517715c47e62bd9 (patch) | |
tree | 3031fb94837928f6afc8436aaa77c2c70a6fead4 /NEWS.md | |
parent | 3b2804c8158a32e3d3b232430e48955a7dfc9178 (diff) | |
download | rsync-6b8db0f6440b28d26ef807d17517715c47e62bd9.tar.gz |
Add an arg-protection idiom using backslash-escapes
The new default is to protect args and options from unintended shell
interpretation using backslash escapes. See the new `--old-args` option
for a way to get the old-style splitting. This idiom was chosen over
making `--protect-args` enabled by default because it is more backward
compatible (e.g. it works with rrsync). Fixes #272.
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -4,7 +4,23 @@ ## Changes in this version: -### OUTPUT CHANGES: +### BEHAVIOR CHANGES: + + - A new form of arg protection was added that works similarly to the older + `--protect-args` (`-s`) option but in a way that avoids breaking things like + rrsync (the restricted rsync script): rsync now uses backslash escaping for + sending "shell-active" characters to the remote shell. This includes spaces, + so fetching a remote file via a simple quoted filename value now works by + default without any extra quoting: + + ```shell + rsync -aiv host:'a simple file.pdf' . + ``` + + Wildcards are not escaped in filename args, but they are escaped in options + like the `--suffix` and `--usermap` values. If your rsync script depends on + the old arg-splitting behavior, either run it with the `--old-args` option + or `export RSYNC_OLD_ARGS=1` in the script's environment. - A long-standing bug was preventing rsync from figuring out the current locale's decimal point character, which made rsync always output numbers |