Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4094 closed defect (fixed)

"TestSocks 1" and IP addresses in requests using "safe" socks protocols result in misleading log messages

Reported by: fk Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: Tor: 0.2.3.4-alpha
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

According to the man page, the TestSocks option causes Tor to
"make a notice-level log entry for each connection to the Socks
port indicating whether the request used a safe socks protocol
or an unsafe one".

In case of "safe" socks protocols Tor however goes a bit
further and always claims:

Your application (using socks(4a|5) to port 80) gave Tor a hostname, which means Tor will do the DNS resolve for you. This is good.

The message is printed even if the application actually gave
Tor an IP address and not a hostname.

I think Tor should either verify that a hostname has been given,
or the log message should be reworded to something like:

Your application (using socks(4a|5) to port 80) instructed Tor
to take care of the DNS resolution itself if necessary. This is good.

Child Tickets

Attachments (1)

tor-0.2.3.5-alpha-Rephrase-the-log-messages-emitted-if-the-TestSocks-c.patch (2.1 KB) - added by fk 8 years ago.
Rephrase the log messages emitted if the TestSocks check is positive

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by arma

I'm fine with a change like this.

Changed 8 years ago by fk

Rephrase the log messages emitted if the TestSocks check is positive

comment:2 Changed 8 years ago by fk

Status: newneeds_review

I didn't consider the various ways an IP address can be
expressed.

Actually verifying that a hostname has been given may not
be worth it, especially given that the user can already let
Tor additionally log the destination address used by the client
by temporarily disabling SafeLogging.

The attached patch thus only rewords the messages as suggested.

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks good to me; merged.

comment:4 Changed 7 years ago by nickm

Keywords: tor-client added

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.