[tor-commits] [tor/master] control: Don't check if Server is an HSDir for HSPOST

nickm at torproject.org nickm at torproject.org
Wed Dec 6 00:44:53 UTC 2017


commit 475d8d1a3d2e68c237095b88417f756afc360147
Author: David Goulet <dgoulet at torproject.org>
Date:   Wed Nov 15 14:37:11 2017 -0500

    control: Don't check if Server is an HSDir for HSPOST
    
    This is removed for two reasons. First, HSDir accepts descriptor even though
    they don't think they are in fact an HSDir. This is to avoid consensus desync
    between client/service and directories.
    
    Second, our malicious HSDir scanner uses the HSPOST command to post on all
    relays in order to test them before they could become HSDir. We had to remove
    that check from the tor code that the scanner uses.
    
    Thus, this check should not be enforced by the control port for the above use
    cases. It is also a bit more complex with v3 support for which not all HSDir
    support it so basically irrelevant check.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/or/control.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/or/control.c b/src/or/control.c
index 24e3ebe7d..7ade90ea8 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -4370,11 +4370,6 @@ handle_control_hspost(control_connection_t *conn,
                                    server);
           goto done;
         }
-        if (!node->rs->is_hs_dir) {
-          connection_printf_to_buf(conn, "552 Server \"%s\" is not a HSDir"
-                                         "\r\n", server);
-          goto done;
-        }
         /* Valid server, add it to our local list. */
         if (!hs_dirs)
           hs_dirs = smartlist_new();





More information about the tor-commits mailing list