[tbb-bugs] #17568 [Tor Browser]: Clean up tor-control-port.js in Torbutton

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 11 12:53:59 UTC 2015


#17568: Clean up tor-control-port.js in Torbutton
---------------------------+--------------------------
 Reporter:  gk             |          Owner:  tbb-team
     Type:  task           |         Status:  new
 Priority:  Medium         |      Milestone:
Component:  Tor Browser    |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:  tbb-torbutton  |  Actual Points:
Parent ID:                 |         Points:
  Sponsor:                 |
---------------------------+--------------------------

Comment (by gk):

 Here are some things I thought about while reading the code in tor-
 control-port.js. I am confused about other things(, too) (especially while
 looking at the spec + the controller.c file) but these might be more for a
 second clean-up (after I had more time to sort them out).

 1)
 {{{
   // GETCONF with a single argument returns results that look like
   // results from GETINFO with multiple arguments."
 }}}
 Does not seem to be so:
 {{{
 [11-10 15:33:46] Torbutton INFO: controlPort << getconf bridge


 [11-10 15:33:46] Torbutton INFO: controlPort >> 250 Bridge
 [11-10 15:33:46] Torbutton INFO: controlPort << getinfo version config-
 file


 [11-10 15:33:46] Torbutton INFO: controlPort >> 250-version=0.2.7.4-rc
 (git-f55d23e1e66e9b0f)
 250-config-file=/path/to/torbrowser/tor-
 browser/Browser/TorBrowser/Data/Tor/torrc
 250 OK
 }}}

 2)
 "kind of parsing for" <- seems the sentence is trailing off

 3)
 s/displatcher/dispatcher/

 4) I wonder why we only have `getInfoMultiple()` given that both GETINFO
 and GETCONF can have multiple keywords (we use them both with just one
 keyword right now as far as I can see which does not explain the different
 treatment of both to me)

 5) There are a bunch of comments in `getInfoMultiple()` and `getInfo` we
 probably might want to get rid of.

 6) Tor Launcher has a different way of parsing things (leading to
 different results it seems (take the case of a `250 Bridge` reply for
 `GETCONF bridge`, e.g.). I think we should look at it and have our Tor
 Browser controllers behave the same way even if they are using different
 parsing means.

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


More information about the tbb-bugs mailing list