diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-07-07 13:04:39 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-07-07 13:04:39 +0300 |
commit | cb9e3466188aae17e08844ac5a193a35b07edba3 (patch) | |
tree | df7d444076e0a71bbbf87fc07bcb79f4f5c0a19c | |
parent | d89bffb8c75c6e58d698c17fec2d0462efd77e61 (diff) | |
parent | 8b026b4eeef1cb3de672d120dfa2018c9ce67f0d (diff) | |
download | tor-cb9e3466188aae17e08844ac5a193a35b07edba3.tar.gz tor-cb9e3466188aae17e08844ac5a193a35b07edba3.zip |
Merge branch 'maint-0.4.6' into release-0.4.6
-rw-r--r-- | changes/ticket40421 | 3 | ||||
-rw-r--r-- | src/core/or/connection_edge.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/changes/ticket40421 b/changes/ticket40421 new file mode 100644 index 0000000000..d2dcc5533d --- /dev/null +++ b/changes/ticket40421 @@ -0,0 +1,3 @@ + o Minor bugfixes (onion service): + - Send back the extended SOCKS error 0xF6 for a v2 onion address. Fixes bug + 40421; bugfix on 0.4.6.2-alpha. diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index a307249967..6f6f22a0d4 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -2536,6 +2536,10 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, "https://blog.torproject.org/v2-deprecation-timeline."); control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s", escaped(socks->address)); + /* Send back the 0xF6 extended code indicating a bad hostname. This is + * mostly so Tor Browser can make a proper UX with regards to v2 + * addresses. */ + conn->socks_request->socks_extended_error_code = SOCKS5_HS_BAD_ADDRESS; connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL); return -1; } |