Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #2893

Closed (moved)
Open
Opened Apr 11, 2011 by Roger Dingledine@arma

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.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.3.x-final
Milestone
Tor: 0.2.3.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#2893