]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make HSFETCH take the decoded length into account, not the base32 one
authorNeel Chauhan <neel@neelc.org>
Tue, 16 Jun 2020 21:38:08 +0000 (14:38 -0700)
committerNick Mathewson <nickm@torproject.org>
Wed, 7 Oct 2020 12:35:12 +0000 (08:35 -0400)
changes/bug34400 [new file with mode: 0644]
src/feature/control/control_cmd.c

diff --git a/changes/bug34400 b/changes/bug34400
new file mode 100644 (file)
index 0000000..e2b5668
--- /dev/null
@@ -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.
index 8259c3b353bd0c1451d859afd0d23155b5b72bd3..b3f61549ad0ee56c6f1c00775f459cdbf2fa74c1 100644 (file)
@@ -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;