View | Details | Raw Unified | Return to bug 1164 | Differences between
and this patch

Collapse All | Expand All

(-)a/scp.c (-4 / +9 lines)
Lines 915-924 toremote(int argc, char **argv) Link Here
915
			goto out;
915
			goto out;
916
		}
916
		}
917
	}
917
	}
918
	if (tuser != NULL && !okname(tuser)) {
919
		++errs;
920
		goto out;
921
	}
922
918
923
	/* Parse source files */
919
	/* Parse source files */
924
	for (i = 0; i < argc - 1; i++) {
920
	for (i = 0; i < argc - 1; i++) {
Lines 953-958 toremote(int argc, char **argv) Link Here
953
			(void) close(remout);
949
			(void) close(remout);
954
			remin = remout = -1;
950
			remin = remout = -1;
955
		} else if (host) {	/* standard remote to remote */
951
		} else if (host) {	/* standard remote to remote */
952
			/*
953
			 * Second remote user is passed to first remote side
954
			 * via scp command-line. Ensure it contains no obvious
955
			 * shell characters.
956
			 */
957
			if (tuser != NULL && !okname(tuser)) {
958
				++errs;
959
				continue;
960
			}
956
			if (tport != -1 && tport != SSH_DEFAULT_PORT) {
961
			if (tport != -1 && tport != SSH_DEFAULT_PORT) {
957
				/* This would require the remote support URIs */
962
				/* This would require the remote support URIs */
958
				fatal("target port not supported with two "
963
				fatal("target port not supported with two "

Return to bug 1164