[tor-bugs] #29539 [Core Tor/Stem]: version key should be in the second possition in the Bandwidth File
    Tor Bug Tracker & Wiki 
    blackhole at torproject.org
       
    Wed Feb 20 08:51:45 UTC 2019
    
    
  
#29539: version key should be in the second possition in the Bandwidth File
-------------------------------+------------------------
     Reporter:  juga           |      Owner:  atagar
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/Stem  |    Version:
     Severity:  Normal         |   Keywords:  tor-bwauth
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+------------------------
 According to the spec: https://gitweb.torproject.org/torspec.git/tree
 /bandwidth-file-spec.txt?id=698d6301a409c8ebb2db389d06d2ee8f40d0fa3a#n152
 But i can create a Bandwidth File with version in other position:
 {{{
 >>> content = """1523911758
 ... earliest_bandwidth=2019-02-14T16:06:24
 ... version=1.2
 ... =====
 ... bw=760 node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 nick=Test"""
 ... bwfile = BandwidthFile.from_str(content)
 ...
 ...
 >>> str(bwfile)
 '1523911758\nearliest_bandwidth=2019-02-14T16:06:24\nversion=1.2\n=====\nbw=760
 node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 nick=Test'
 >>>
 }}}
 When generating the string, the version should be in the second position.
 When parsing the string, i'm not sure if we should assume that is version
 1.0 and ignore all the other headers or because stem is able to parse it,
 ignore the error and accept it's version 1.2
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29539>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
    
    
More information about the tor-bugs
mailing list