mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
hs-v3: Return bad address SOCKS5 extended error
If ExtendedErrors is set for the SocksPort, an invalid .onion address now returns the 0xF6 error code per prop304. Closes #30022 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
committed by
George Kadianakis
parent
21b3303657
commit
709d7fba11
@@ -2123,7 +2123,7 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
|
||||
control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s",
|
||||
escaped(socks->address));
|
||||
if (addresstype == ONION_V3_HOSTNAME) {
|
||||
conn->socks_request->socks_extended_error_code = SOCKS5_HS_IS_INVALID;
|
||||
conn->socks_request->socks_extended_error_code = SOCKS5_HS_BAD_ADDRESS;
|
||||
}
|
||||
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user