From: Andrew Tridgell Date: Fri, 15 May 2026 00:17:03 +0000 (+1000) Subject: main: reject hyphen-prefixed remote-shell hostnames X-Git-Tag: v3.4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147e9bea8c25d42f807b8d12b21d67093c409dfe;p=thirdparty%2Frsync.git main: reject hyphen-prefixed remote-shell hostnames --- diff --git a/main.c b/main.c index 8c6718eb..78f0b833 100644 --- a/main.c +++ b/main.c @@ -1568,6 +1568,10 @@ static int start_client(int argc, char *argv[]) shell_user = shell_machine; shell_machine = p+1; } + if (*shell_machine == '-') { + rprintf(FERROR, "Invalid remote host: hostnames may not start with '-'.\n"); + exit_cleanup(RERR_SYNTAX); + } } if (DEBUG_GTE(CMD, 2)) {