summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-04-21 14:04:39 -0400
committerDavid Goulet <dgoulet@ev0ke.net>2015-04-22 09:28:20 -0400
commit6f5f38a0bc60d3be9b6cf02e29b9065869cf6af8 (patch)
tree991881106ef6f00304891d767272288c379e9a00 /src/or/control.c
parenta4585405d6e103b9a48a1401321477ea08fa2ad1 (diff)
downloadtor-6f5f38a0bc60d3be9b6cf02e29b9065869cf6af8.tar.gz
tor-6f5f38a0bc60d3be9b6cf02e29b9065869cf6af8.zip
Add function to validate HS descriptor ID
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index b4d671bea8..313532432a 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3284,7 +3284,7 @@ handle_control_hsfetch(control_connection_t *conn, uint32_t len,
if (rend_valid_service_id(arg1)) {
hsaddress = arg1;
} else if (strcmpstart(arg1, v2_str) == 0 &&
- strlen(arg1 + v2_str_len) == REND_DESC_ID_V2_LEN_BASE32 &&
+ rend_valid_descriptor_id(arg1 + v2_str_len) &&
base32_decode(digest, sizeof(digest), arg1 + v2_str_len,
REND_DESC_ID_V2_LEN_BASE32) == 0) {
/* We have a well formed version 2 descriptor ID. Keep the decoded value