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

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Aug 8 07:35:02 UTC 2016


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

Comment (by karsten):

 Replying to [comment:16 iwakeh]:
 > The patch doesn't correct the extra-info descriptor part
 [https://gitweb.torproject.org/collector.git/tree/src/main/java/org/torproject/collector/relaydescs/RelayDescriptorParser.java#n272
 here and below] (afaict)?

 Hmm, I don't yet see what you mean.  The only place where we're using
 metrics-lib's `DescriptorParser` to parse a byte array is
 `ArchiveWriter#store()`.  The `haveParsed...` method called below the
 place you referenced only tells the downloader that we have parsed a
 descriptor and that it should attempt to fetch any descriptors referenced
 from it.  And the ASCII conversion above is only there to find descriptor
 start and end, though we're computing the digest on the non-converted byte
 array.  Can you give an example of a case where we're still rejecting a
 descriptor only because of metrics-lib?

 > `logger` should be accessed in a static way; currently all access to
 `logger` are done like `this.logger`.  Maybe, just include this minor
 change in the patch?

 You mean just the one call in the patch?  Certainly!  Pushed a fixup
 commit to the same branch.  I'd also love to change the remaining calls,
 but I'm a bit worried that it'll make merging of the other branches
 harder.  But I can easily do that prior to the release when all branches
 are in.  I'll add a note to the release ticket.

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


More information about the tor-bugs mailing list