mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 04:13:39 +00:00
Don't send port number to proxy unless it's not the standard FTP port
This commit is contained in:
parent
2cf2d5b177
commit
2e88106bd1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63712
@ -651,8 +651,12 @@ _ftp_connect(char *host, int port, char *user, char *pwd, char *flags)
|
||||
/* send user name and password */
|
||||
if (!user || !*user)
|
||||
user = FTP_ANONYMOUS_USER;
|
||||
e = p ? _ftp_cmd(cd, "USER %s@%s@%d", user, host, port)
|
||||
: _ftp_cmd(cd, "USER %s", user);
|
||||
if (p && port == FTP_DEFAULT_PORT)
|
||||
e = _ftp_cmd(cd, "USER %s@%s", user, host);
|
||||
else if (p)
|
||||
e = _ftp_cmd(cd, "USER %s@%s@%d", user, host, port);
|
||||
else
|
||||
e = _ftp_cmd(cd, "USER %s", user);
|
||||
|
||||
/* did the server request a password? */
|
||||
if (e == FTP_NEED_PASSWORD) {
|
||||
|
Loading…
Reference in New Issue
Block a user