Opened 12 years ago

Last modified 7 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: 0.2.0.20-rc
Severity: Keywords:
Cc: edmanm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor 0.2.0.20-rc'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
command:

tor ControlPort 9051 HashedControlPassword 16:09724E2AACEF0B4C60BD49793E3B2F84912034369B6528CCE2815BBE70

The PROTOCOLINFO command then returns the following results:

edmanm@lysithea:~$ telnet localhost 9051
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
protocolinfo
250-PROTOCOLINFO 1
250-AUTH METHODS=NULL
250-VERSION Tor="0.2.0.20-rc"
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 12 years ago by arma

Added in r13777. Thanks!

comment:2 Changed 12 years ago by arma

flyspray2trac: bug closed.

comment:3 Changed 7 years ago by nickm

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