[tor-bugs] #19170 [Metrics/CollecTor]: make parsing more robust (extra-info)

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 26 15:46:58 UTC 2016

#19170: make parsing more robust (extra-info)
 Reporter:  iwakeh             |          Owner:  iwakeh
     Type:  defect             |         Status:  new
 Priority:  Medium             |      Milestone:
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:  ctip               |  Actual Points:
Parent ID:                     |         Points:
 Reviewer:                     |        Sponsor:

Comment (by karsten):

 Huh, fine questions.  Let's go through some possible ways of handling

  - Continue to reject descriptors containing problematic characters:
 Admittedly, this is not pretty, because nobody will know why a descriptor
 is missing, even if it's missing for a good reason.  After all,
 descriptors should only contain ASCII, period.  But, meh.
  - Replace problematic characters: I don't think we can do that, because
 that would break the signature.  In general, I think we shouldn't touch
 descriptor contents.
  - Ignore problematic characters: We're accepting non-ASCII characters in
 other lines (contact and platform, for example), so we could as well
 accept them in lines containing country codes.  The ugly part is that we'd
 have to distinguish DescriptorParseExceptions by severity, which is not
 really supported by metrics-lib yet.
  - Accept anything as long as the signature is valid: This is like the
 previous suggestion but going one step further and even accepting lines we
 think are otherwise malformed.  We're not verifying signatures yet, so
 this could only be a longer-term solution.  Basically, whatever the
 directory authorities accept is also what we accept, regardless of whether
 there's a bug in the authorities or not.

 I don't yet know which variant I like most.  Thoughts?

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19170#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tor-bugs mailing list