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
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

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
  • #26112

Closed
Open
Opened May 15, 2018 by dmr@dmr

Stem should not use human-readable message of GETCONF 552 response

Both tor and stem use a message format for GETCONF 552 errors that differs from [wording of the control spec's GETCONF response].

GETCONF output via tor-prompt:

>>> GETCONF blah
552 Unrecognized configuration key "blah"

Stem //expects// this format; see [[https://gitweb.torproject.org/stem.git/tree/stem/response/getconf.py?id=aa692e62bfda5be8b87e463c3c899cb13968d32a#n33|GetConfResponse]]:

      unrecognized_keywords = []
      for code, _, line in self.content():
        if code == '552' and line.startswith('Unrecognized configuration key "') and line.endswith('"'):
          unrecognized_keywords.append(line[32:-1])

      if unrecognized_keywords:
        raise stem.InvalidArguments('552', 'GETCONF request contained unrecognized keywords: %s' % ', '.join(unrecognized_keywords), unrecognized_keywords)
      else:
        raise stem.ProtocolError('GETCONF response contained a non-OK status code:\n%s' % self)

My tor version, for reference:

>>> GETINFO version
250-version=0.3.2.10 (git-0edaa32732ec8930)
250 OK

==== Historical note In searching (for potential duplicates) to file this ticket, I happened upon the original ticket: #6114 (closed)

==== Priority, Severity I'm marking this as low,minor because it appears the code will work decently well (still raise //an// exception) if the message format changes.

==== Expected behavior In discussion over #tor-dev, it was agreed that stem (and generally any controller) shouldn't rely on a specific message. Only the numeric code 552 should be relied upon.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#26112