diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-12-30 16:36:16 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-12-30 16:36:16 +0000 |
commit | d87d4183eee40d172eda5265feb0fddfe723dd06 (patch) | |
tree | 210dfaec5983db059524cd218414e667dbd75f84 | |
parent | e936b9b47de954fa1f34110b871edc695cbcf696 (diff) | |
download | tor-d87d4183eee40d172eda5265feb0fddfe723dd06.tar.gz tor-d87d4183eee40d172eda5265feb0fddfe723dd06.zip |
Allow IPv4 and IPv6 addresses in SOCKS5 FQDN requests.
Supposedly there are a decent number of applications that "support"
IPv6 and SOCKS5 using the FQDN address type. While said applications
should be using the IPv6 address type, allow the connection if
SafeSocks is not set.
Bug not in any released version.
-rw-r--r-- | src/or/buffers.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 4cdc03bc03..f0d7e60794 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -2063,9 +2063,7 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req, socks_request_set_socks5_error(req, SOCKS5_NOT_ALLOWED); return -1; } - } - - if (!string_is_valid_hostname(req->address)) { + } else if (!string_is_valid_hostname(req->address)) { socks_request_set_socks5_error(req, SOCKS5_GENERAL_ERROR); log_warn(LD_PROTOCOL, |