mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
hs-v2: Disable SOCKS connection for v2 addresses
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>
This commit is contained in:
parent
fcef8e3f75
commit
13b2b1108f
@ -4348,9 +4348,6 @@ parse_extended_hostname(char *address)
|
|||||||
if (q != address) {
|
if (q != address) {
|
||||||
memmove(address, q, strlen(q) + 1 /* also get \0 */);
|
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)) {
|
if (hs_address_is_valid(query)) {
|
||||||
return ONION_V3_HOSTNAME;
|
return ONION_V3_HOSTNAME;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user