Opened 13 years ago

Last modified 8 years ago

#615 closed defect (Fixed)

PROTOCOLINFO returns incorrect auth methods when HashedControlPassword is used on command line

Reported by: edmanm Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: edmanm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Tor's response to a PROCOLINFO command fails to include the HASHEDPASSWORD method when a
HashedControlPassword is used on the command line. This can be reproduced by starting Tor with the following

tor ControlPort 9051 HashedControlPassword 16:09724E2AACEF0B4C60BD49793E3B2F84912034369B6528CCE2815BBE70

The PROTOCOLINFO command then returns the following results:

edmanm@lysithea:~$ telnet localhost 9051
Connected to localhost.
Escape character is '^]'.
250-VERSION Tor=""
250 OK

Note that the PROTOCOLINFO response claims Tor does not require any authentication, even though the
HASHEDPASSWORD method should be included in the AUTH METHODS list.

The following patch fixes the problem:

Index: src/or/control.c
--- src/or/control.c (revision 13776)
+++ src/or/control.c (working copy)
@@ -2541,7 +2541,8 @@

char *esc_cfile = esc_for_log(cfile);
char *methods;

  • int passwd = (options->HashedControlPassword != NULL);
+ int passwd = (options->HashedControlPassword != NULL

+ options->HashedControlSessionPassword != NULL);

smartlist_t *mlist = smartlist_create();
if (cookies)

smartlist_add(mlist, (char*)"COOKIE");

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 13 years ago by arma

Added in r13777. Thanks!

comment:2 Changed 13 years ago by arma

flyspray2trac: bug closed.

comment:3 Changed 8 years ago by nickm

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