#26023 closed defect (fixed)

BridgeDB won't start due to Stem throwing a ValueError on a weird ed25519 cert

Reported by: isis Owned by: isis
Priority: Immediate Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Critical Keywords: bridgedb-parsers, stem
Cc: sysrqb Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor:

Description

Traceback (most recent call last):
  File "/home/bridgedb/virtualenvs/bridgedb/bin/bridgedb", line 4, in <module>
    __import__('pkg_resources').run_script('bridgedb==0.6.4+0.g4faecd5.dirty', 'bridgedb')
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/pkg_resources/__init__.py", line 696, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1614, in run_script
    exec(code, namespace, namespace)
  File "/srv/bridges.torproject.org/home/virtualenvs/bridgedb/lib/python2.7/site-packages/bridgedb-0.6.4+0.g4faecd5.dirty-py2.7.egg/EGG-INFO/scripts/bridgedb", line 31, in <module>
    run(option)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.4+0.g4faecd5.dirty-py2.7.egg/bridgedb/main.py", line 458, in run
    emailDistributor, ipDistributor, moatDistributor = reload(False)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.4+0.g4faecd5.dirty-py2.7.egg/bridgedb/main.py", line 414, in reload
    load(state, hashring, clear=False)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.4+0.g4faecd5.dirty-py2.7.egg/bridgedb/main.py", line 128, in load
    serverdescriptors = descriptors.parseServerDescriptorsFile(fn)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.4+0.g4faecd5.dirty-py2.7.egg/bridgedb/parse/descriptors.py", line 164, in parseServerDescriptorsFile
    routers = list(document)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/__init__.py", line 199, in parse_file
    for desc in handler(descriptor_file, descriptor_type, validate, document_handler, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/__init__.py", line 265, in _parse_file_for_path
    for desc in parse_file(desc_file, *args, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/__init__.py", line 256, in parse_file
    for desc in parse(descriptor_file):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/__init__.py", line 303, in _parse_metrics_file
    for desc in stem.descriptor.server_descriptor._parse_file(descriptor_file, is_bridge = False, validate = validate, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/server_descriptor.py", line 221, in _parse_file
    yield RelayDescriptor(descriptor_text, validate, annotations, **kwargs)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/server_descriptor.py", line 817, in __init__
    super(RelayDescriptor, self).__init__(raw_contents, validate, annotations)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/server_descriptor.py", line 637, in __init__
    self._parse(entries, validate)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/__init__.py", line 678, in _parse
    parser_for_line[keyword](self, entries)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/server_descriptor.py", line 439, in _parse_identity_ed25519_line
    descriptor.certificate = stem.descriptor.certificate.Ed25519Certificate.parse(''.join(cert_lines[1:-1]))
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/certificate.py", line 125, in parse
    return Ed25519CertificateV1(version, content, decoded)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/certificate.py", line 165, in __init__
    self.expiration = datetime.datetime.utcfromtimestamp(stem.util.str_tools._to_int(decoded[2:6]) * 3600)
ValueError: year is out of range

Child Tickets

Change History (1)

comment:1 Changed 19 months ago by isis

Resolution: fixed
Status: newclosed

See my bug26023 branch, and I've made a 0.6.5 version release and shipped it to prod.

Note: See TracTickets for help on using tickets.