mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-08-02 16:57:40 -04:00
main: reject hyphen-prefixed remote-shell hostnames
This commit is contained in:
4
main.c
4
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)) {
|
||||
|
||||
Reference in New Issue
Block a user