X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/a673e21051a4563311299e7fbff709e1115d2f4d..a748a096fb9654d8704ceacdb339507722320f6a:/scp.c diff --git a/scp.c b/scp.c index 7a8cebde..2361d803 100644 --- a/scp.c +++ b/scp.c @@ -375,8 +375,6 @@ int from_backend(int is_stderr, char *data, int datalen) return 0; } - inbuf_head = 0; - /* * If this is before the real session begins, just return. */ @@ -604,6 +602,15 @@ static void do_cmd(char *host, char *user, char *cmd) cfg.port = portnumber; /* + * Disable scary things which shouldn't be enabled for simple + * things like SCP and SFTP: agent forwarding, port forwarding, + * X forwarding. + */ + cfg.x11_forward = 0; + cfg.agentfwd = 0; + cfg.portfwd[0] = cfg.portfwd[1] = '\0'; + + /* * Attempt to start the SFTP subsystem as a first choice, * falling back to the provided scp command if that fails. */