summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2021-02-22 12:38:44 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2021-02-22 12:57:43 +0200
commitc0a23303140fedce06e0b7d88ce475c39703717a (patch)
treec9032e9169550c46660ff9c8ad04aae8da0014bf /src/feature
parent8ccfd4a51ad55e9834cffcc91cbaa13e1f19c8ff (diff)
downloadtor-c0a23303140fedce06e0b7d88ce475c39703717a.tar.gz
tor-c0a23303140fedce06e0b7d88ce475c39703717a.zip
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.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/control/control_cmd.c8
1 files changed, 0 insertions, 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. */