Tor controller requires space in 'authenticate' command
``` 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. ```
issue