commit c0a23303140fedce06e0b7d88ce475c39703717a Author: George Kadianakis desnacked@riseup.net Date: Mon Feb 22 12:38:44 2021 +0200
Fix CID 1473233 in handle_control_hsfetch().
With v2 support for HSFETCH gone, we only support v3 addresses. We don't support v2 descriptor IDs anymore and hence we can remove that code.
The code removed would ensure that if a v2 descriptor ID was provided, the user also had to provide HSDirs explicitly.
In the v3 case, the code should work even if no HSDirs are provided, and Tor would find the HSDirs itself. --- src/feature/control/control_cmd.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c index 009105bb20..d8418d9b36 100644 --- a/src/feature/control/control_cmd.c +++ b/src/feature/control/control_cmd.c @@ -1437,7 +1437,6 @@ handle_control_hsfetch(control_connection_t *conn, const control_cmd_args_t *args)
{ - char *desc_id = NULL; smartlist_t *hsdirs = NULL; ed25519_public_key_t v3_pk; uint32_t version; @@ -1474,13 +1473,6 @@ handle_control_hsfetch(control_connection_t *conn, } }
- /* Using a descriptor ID, we force the user to provide at least one - * hsdir server using the SERVER= option. */ - if (desc_id && (!hsdirs || !smartlist_len(hsdirs))) { - control_write_endreply(conn, 512, "SERVER option is required"); - goto done; - } - /* We are about to trigger HSDir fetch so send the OK now because after * that 650 event(s) are possible so better to have the 250 OK before them * to avoid out of order replies. */
tor-commits@lists.torproject.org