[tor-bugs] #28863 [Core Tor/Fallback Scripts]: updateFallbackDirs.py thinks it is python 3 compatible but it is not

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 17 04:39:29 UTC 2018


#28863: updateFallbackDirs.py thinks it is python 3 compatible but it is not
---------------------------------------+-----------------------------------
 Reporter:  starlight                  |          Owner:  (none)
     Type:  defect                     |         Status:  new
 Priority:  Medium                     |      Milestone:  Tor:
                                       |  0.4.0.x-final
Component:  Core Tor/Fallback Scripts  |        Version:  Tor:
                                       |  0.3.5.5-alpha
 Severity:  Normal                     |     Resolution:
 Keywords:                             |  Actual Points:
Parent ID:  #28793                     |         Points:
 Reviewer:                             |        Sponsor:
---------------------------------------+-----------------------------------
Changes (by teor):

 * parent:   => #28793
 * milestone:   => Tor: 0.4.0.x-final


Comment:

 Thanks for this patch.

 We don't have CI for this script yet, so we can easily make changes that
 break some platforms. (I might wait to merge this patch until we have CI
 for python 2 and 3.)

 Replying to [comment:1 starlight]:
 > The TLS certificate validation problem could be the result of running
 with torsocks.  Two years+ ago updateFallbackDirs.py ran fine this way,
 but much code has been added and changed since.  Did not try running over
 direct connection.

 Running the script over Tor was never supported, because the script is
 designed to measure  direct consensus download speeds. We documented this
 requirement in April 2016:
 {{{
 # This script should be run from a stable, reliable network connection,
 # with no other network activity (and not over tor).
 # If this is not possible, please disable:
 # PERFORM_IPV4_DIRPORT_CHECKS and PERFORM_IPV6_DIRPORT_CHECKS
 }}}

 I am not sure about the https change, the only https URL I can see is:
 {{{
 ONIONOO = 'https://onionoo.torproject.org/'
 }}}

 This URL validates fine in my (Tor) browser.

 I also see this note in the Python 2 urllib2 documentation:
 {{{
 Note The urllib2 module has been split across several modules in Python 3
 named urllib.request and urllib.error. The 2to3 tool will automatically
 adapt imports when converting your sources to Python 3.
 }}}
 https://docs.python.org/2/library/urllib2.html

 Is your patch missing the imports for python 3?

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


More information about the tor-bugs mailing list