[tor-commits] [stem/master] ADD_ONION accepts FQDN targets

atagar at torproject.org atagar at torproject.org
Tue Jan 12 16:44:26 UTC 2016


commit f6e4f847ab68b6102891678b3041f9e0ff996ac9
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Jan 12 08:40:12 2016 -0800

    ADD_ONION accepts FQDN targets
    
    On most systems the following requests balk, but after reformatting for some
    reason mine thinks its acceptable...
    
      >>> ADD_ONION NEW:BEST Port=4567,not_an_address:4567
      250-ServiceID=4e5bpsy6e46onv3k
      250-PrivateKey=RSA1024:[crypto blob]
      250 OK
    
    Yawning and I discussed this on...
    
      https://trac.torproject.org/projects/tor/ticket/18029
    
    Turns out targets can be a fully qualified domain name, so seems my
    getaddrinfo() is being particularly liberal with what it accepts. Still unsure
    if FQDN targets is desirable...
    
      https://trac.torproject.org/projects/tor/ticket/18037
    
    ... but regardless, time to fix our tests now that we know what's up.
---
 test/integ/control/controller.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 7cf16ea..a755540 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -630,7 +630,7 @@ class TestController(unittest.TestCase):
     runner = test.runner.get_runner()
 
     with runner.get_tor_controller() as controller:
-      for ports in (4567890, [4567, 4567890], {4567: 'not_an_address:4567'}):
+      for ports in (4567890, [4567, 4567890], {4567: '-:4567'}):
         try:
           # try creating a service with an invalid port
           response = controller.create_ephemeral_hidden_service(ports)



More information about the tor-commits mailing list