[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.4.4] Consistently use 'address' in Invalid v3 address responses to ONION_CLIENT_AUTH commands



commit 3d0e1c42d931a593ee326d17473700ba663cb48e
Author: Miguel Jacq <mig@xxxxxxxx>
Date:   Thu Jun 18 13:47:15 2020 +1000

    Consistently use 'address' in Invalid v3 address responses to ONION_CLIENT_AUTH commands
---
 changes/ticket40005              | 3 +++
 src/feature/control/control_hs.c | 3 ++-
 src/test/test_hs_control.c       | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/changes/ticket40005 b/changes/ticket40005
new file mode 100644
index 000000000..12727e0a0
--- /dev/null
+++ b/changes/ticket40005
@@ -0,0 +1,3 @@
+  o Minor bugfix (control port, onion service):
+    - Consistently use 'address' in "Invalid v3 address" response to
+      ONION_CLIENT_AUTH commands. Fixes bug 40005; bugfix on 0.4.3.1-alpha.
diff --git a/src/feature/control/control_hs.c b/src/feature/control/control_hs.c
index f5b331de9..c8de03b31 100644
--- a/src/feature/control/control_hs.c
+++ b/src/feature/control/control_hs.c
@@ -291,7 +291,8 @@ handle_control_onion_client_auth_view(control_connection_t *conn,
   if (argc >= 1) {
     hsaddress = smartlist_get(args->args, 0);
     if (!hs_address_is_valid(hsaddress)) {
-      control_printf_endreply(conn, 512, "Invalid v3 addr \"%s\"", hsaddress);
+      control_printf_endreply(conn, 512, "Invalid v3 address \"%s\"",
+                              hsaddress);
       goto err;
     }
   }
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index 8ba9f1173..1f574179e 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -393,7 +393,7 @@ test_hs_control_good_onion_client_auth_add(void *arg)
   retval = handle_control_command(&conn, (uint32_t) strlen(args), args);
   tt_int_op(retval, OP_EQ, 0);
   cp1 = buf_get_contents(TO_CONN(&conn)->outbuf, &sz);
-  tt_str_op(cp1, OP_EQ, "512 Invalid v3 addr \"house\"\r\n");
+  tt_str_op(cp1, OP_EQ, "512 Invalid v3 address \"house\"\r\n");
 
  done:
   tor_free(args);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits