]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs-v2: Disable SOCKS connection for v2 addresses
authorDavid Goulet <dgoulet@torproject.org>
Thu, 30 Sep 2021 14:26:37 +0000 (10:26 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 30 Sep 2021 14:26:37 +0000 (10:26 -0400)
This effectively turns off the ability of tor to use HSv2 as a client by
invalidating the v2 onion hostname passed through a SOCKS request.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/connection_edge.c

index 84b80313cea214cad398bfe1eb331b8bf57988a9..ae9177a2d0264d11e0e9a02bfe9a153c0b4e6939 100644 (file)
@@ -4348,9 +4348,6 @@ parse_extended_hostname(char *address)
     if (q != address) {
       memmove(address, q, strlen(q) + 1 /* also get \0 */);
     }
-    if (rend_valid_v2_service_id(query)) {
-      return ONION_V2_HOSTNAME; /* success */
-    }
     if (hs_address_is_valid(query)) {
       return ONION_V3_HOSTNAME;
     }