aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-07 08:35:18 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-07 08:35:18 -0400
commitdf3e5e1cb087aca9d323e783345c4932d587455b (patch)
tree9df0bb8564ebd45d7308db5885eff36a074563bc
parentbfa8f3f93a71a4c547be5a4e92fa28bb6cd68c47 (diff)
parent884cad3edffb644a3da8b1e7e704678225cfe4ac (diff)
downloadtor-df3e5e1cb087aca9d323e783345c4932d587455b.tar.gz
tor-df3e5e1cb087aca9d323e783345c4932d587455b.zip
Merge branch 'maint-0.4.3' into release-0.4.3
-rw-r--r--changes/bug344005
-rw-r--r--src/feature/control/control_cmd.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug34400 b/changes/bug34400
new file mode 100644
index 0000000000..e2b56688b9
--- /dev/null
+++ b/changes/bug34400
@@ -0,0 +1,5 @@
+ o Minor bugfixes (v2 onion services):
+ - For HSFETCH commands on v2 onion services addresses, check the length of
+ bytes decoded, not the base32 length. This takes the behavior introduced
+ in commit a517daa56f5848d25ba79617a1a7b82ed2b0a7c0 into consideration.
+ Fixes bug 34400; bugfix on 0.4.1.1-alpha. Patch by Neel Chauhan.
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c
index 8259c3b353..b3f61549ad 100644
--- a/src/feature/control/control_cmd.c
+++ b/src/feature/control/control_cmd.c
@@ -1430,7 +1430,7 @@ handle_control_hsfetch(control_connection_t *conn,
rend_valid_descriptor_id(arg1 + v2_str_len) &&
base32_decode(digest, sizeof(digest), arg1 + v2_str_len,
REND_DESC_ID_V2_LEN_BASE32) ==
- REND_DESC_ID_V2_LEN_BASE32) {
+ sizeof(digest)) {
/* We have a well formed version 2 descriptor ID. Keep the decoded value
* of the id. */
desc_id = digest;