diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2017-06-04 13:14:55 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2017-06-04 13:14:55 +0200 |
commit | 7f05f896630e857ad2803e80b48924f026f66eb7 (patch) | |
tree | c6c43d5cea0e4cb412c37166d2496fbd5dd99d49 /src/or | |
parent | 9e2f78092395d1250f08a21815ab1145409530eb (diff) | |
download | tor-7f05f896630e857ad2803e80b48924f026f66eb7.tar.gz tor-7f05f896630e857ad2803e80b48924f026f66eb7.zip |
Don't reject SOCKS5 requests that contain IP strings
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/buffers.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 1df4be197a..399b591d1c 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1684,13 +1684,7 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req, req->port = ntohs(get_uint16(data+5+len)); *drain_out = 5+len+2; - if (string_is_valid_ipv4_address(req->address) || - string_is_valid_ipv6_address(req->address)) { - if (safe_socks) { - socks_request_set_socks5_error(req, SOCKS5_NOT_ALLOWED); - return -1; - } - } else if (!string_is_valid_hostname(req->address)) { + if (!string_is_valid_hostname(req->address)) { socks_request_set_socks5_error(req, SOCKS5_GENERAL_ERROR); log_warn(LD_PROTOCOL, |