소스 검색

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.
Yawning Angel 9 년 전
부모
커밋
d87d4183ee
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/or/buffers.c

+ 1 - 3
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,