[tor-bugs] #30105 [Core Tor/Tor]: "pr" lines in consensus can have trailing whitespace

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 9 19:39:33 UTC 2019


#30105: "pr" lines in consensus can have trailing whitespace
------------------------------+--------------------
     Reporter:  irl           |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 dir-spec specifies keyword lines as:

 {{{
 KeywordLine ::= Keyword NL | Keyword WS ArgumentChar+ NL
 }}}

 However, observed in the wild:

 {{{
 pr
 }}}

 There is trailing whitespace on line 1840 of the
 [[https://collector.torproject.org/recent/relay-
 descriptors/consensuses/2019-04-09-19-00-00-consensus|2019-04-09 19:00:00
 consensus]]. It is at line 1840.

 As the directory authorities all seem to agree that this trailing
 whitespace should be there we don't have an issue, but it's against the
 spec and has likely happened by accident.

 If we accidentally remove the trailing whitespace, we don't have a
 consensus anymore.

 Options for fixing this are:

 * require trailing whitespace for pr lines with no arguments
 * make a new consensus method that doesn't have trailing whitespace

 Either way, this needs a spec change before we write any code.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30105>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list