Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #29539

Closed
Open
Created Feb 20, 2019 by juga @juga

version key should be in the second possition in the Bandwidth File

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

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking