[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19170 [Metrics/CollecTor]: make parsing more robust (extra-info)
#19170: make parsing more robust (extra-info)
-------------------------------+---------------------------------
Reporter: iwakeh | Owner: iwakeh
Type: defect | Status: accepted
Priority: Medium | Milestone: CollecTor 1.0.0
Component: Metrics/CollecTor | Version:
Severity: Normal | Resolution:
Keywords: ctip | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------+---------------------------------
Comment (by iwakeh):
Idea for an "accept non-ASCII characters" solution (follow-up of
comment:3):
As Karsten pointed out above (comment:2) this would require changes in
metrics-lib, but not necessarily in the direction of having to distinguish
Exception severity.
Another option would be to make use of the `descriptor.parser` and
`descriptor.reader` properties and supply a different non-ascci-accepting
parser, let's call it `LenientParser`, as well as a LenientReader.
* Necessary change in CollecTor would be to set the `descriptor.parser`
and `descriptor.reader` properties to the LenientParser class.
* Necessary change in metrics-lib would be the addition of the
LenientParser, which consist mostly in providing additional ParserHelper
methods that accept non-ascii and calling these in the appropriate places;
most of the code will be the same as in the current, stricter
implementation. Also a LenientReader would have to be supplied.
That way we could switch between implementations.
Users of metrics-lib would also have another option.
Another question that would need to be investigated: how will CollecTor
clients deal with the additional non-compliant data?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19170#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs