]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When we've disabled .exit hostnames, actually reject them.
authorNick Mathewson <nickm@torproject.org>
Wed, 3 Feb 2010 20:59:15 +0000 (15:59 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 3 Feb 2010 20:59:15 +0000 (15:59 -0500)
Previously we were treating them as decent hostnames and sending them
to the exit, which is completely wrong.

ChangeLog
src/or/connection_edge.c

index 2cf77765e04989c0ad1f7be943b5cebffbdebbd9..053ea660b4d70b72f08a14250847388f8f07636a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@ Changes in version 0.2.2.9-alpha - 2010-??-??
       when it updates its libraries in a security patch.
     - Fix static compilation by listing the openssl libraries in the right
       order.  Fixes bug 1237.
+    - Actually reject .exit hostnames when we're supposed to be rejecting
+      them; do not pass them on to the exit server.  Bugfix on 0.2.2.7-alpha;
+      found and diagnosed by Scott Bennett and Downie on or-talk.
 
   o Code simplifications and refactoring:
     - Generate our manpage and HTML documentation using Asciidoc.  This
index d7e8394614aa5b8127c8058c3450a2986a161b17..8447853fc154522ca3e82f31be8838cc05186616 100644 (file)
@@ -2935,10 +2935,12 @@ parse_extended_hostname(char *address, int allowdotexit)
       if (allowdotexit) {
         *s = 0; /* NUL-terminate it */
         return EXIT_HOSTNAME; /* .exit */
-      } /* else */
-      log_warn(LD_APP, "The \".exit\" notation is disabled in Tor due to "
-               "security risks. Set AllowDotExit in your torrc to enable it.");
-      /* FFFF send a controller event too to notify Vidalia users */
+      } else {
+        log_warn(LD_APP, "The \".exit\" notation is disabled in Tor due to "
+                 "security risks. Set AllowDotExit in your torrc to enable it.");
+        /* FFFF send a controller event too to notify Vidalia users */
+        return BAD_HOSTNAME;
+      }
     }
     if (strcmp(s+1,"onion"))
       return NORMAL_HOSTNAME; /* neither .exit nor .onion, thus normal */