[tbb-bugs] #17568 [Tor Browser]: Clean up tor-control-port.js in Torbutton
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 23 13:29:39 UTC 2015
#17568: Clean up tor-control-port.js in Torbutton
-------------------------------------------------+-------------------------
Reporter: gk | Owner: tbb-
Type: task | team
Priority: Medium | Status:
Component: Tor Browser | needs_review
Severity: Normal | Milestone:
Keywords: tbb-torbutton, | Version:
TorBrowserTeam201511R | Resolution:
Parent ID: | Actual Points:
Sponsor: | Points:
-------------------------------------------------+-------------------------
Comment (by gk):
Seems I forgot to mention that we don't need `"circ" :
info.circuitStatusParser` either at the moment as it seems. :(
One additional thing:
{{{
+ let dataText = message.match(/^650[ \+-]\S+?\s(.*)/m)[1];
+ return controlSocket.addNotificationCallback(new RegExp("^650[ \+-]" +
type),
}}}
I think taking care of the `+`-case is fine but I wonder whether we need
to do that given that we only watch for `STREAM` events (currently). If we
want to cover the generic case here and not want to bother with the RegEx
again in case we add more events to watch for later, then I wonder whether
the RegEx is correct at all given e.g. `650+" Severity CRLF Data 650 SP
"OK" CRLF` (you are checking only for one `\s` before trying to capture
but you get `CRLF`).
Then there is still the `+`-case from '(the "?" modifier added to "+" or
"*")' in comment:1, no? Could you make an argument for why we (still) need
this?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17568#comment:18>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tbb-bugs
mailing list