[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #2893 [Tor Client]: Tor controller requires space in 'authenticate' command



#2893: Tor controller requires space in 'authenticate' command
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:     
     Type:  defect      |         Status:  new
 Priority:  normal      |      Milestone:     
Component:  Tor Client  |        Version:     
 Keywords:  easy        |         Parent:     
   Points:              |   Actualpoints:     
------------------------+---------------------------------------------------
 {{{
 arma@last-request:~/old/torgit/torspec/proposals$ telnet localhost 9051
 Trying ::1...
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 authenticate
 250 OK
 quit
 250 closing connection
 Connection closed by foreign host.
 arma@last-request:~/old/torgit/torspec/proposals$ nc localhost 9051
 authenticate
 551 Invalid quoted string.  You need to put the password in double quotes.
 arma@last-request:~/old/torgit/torspec/proposals$ nc localhost 9051
 authenticate ""
 250 OK
 quit
 250 closing connection
 }}}

 Setting up logging on Tor's side in handle_control_authenticate():
 {{{
  log_notice(LD_CONTROL, "'%s'", body);
 }}}
 in the first case I get
 {{{
 Apr 11 16:39:13.633 [notice] '
 '
 }}}
 and in the second case I get
 {{{
 Apr 11 16:39:23.258 [notice] ''
 }}}

 It looks like that function is checking
 {{{
   } else if (TOR_ISSPACE(body[0])) {
     password = tor_strdup("");
     password_len = 0;
   }
 }}}

 So Tor demands that you have some sort of whitespace before your newline.
 That runs counter to our spec:
 {{{
   Wherever CRLF is specified to be accepted from the controller, Tor MAY
 also
   accept LF.  Tor, however, MUST NOT generate LF instead of CRLF.
   Controllers SHOULD always send CRLF.
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2893>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs