[tor-commits] [tor/maint-0.4.1] Correct the syntax description for the MAPADDRESS command.
nickm at torproject.org
nickm at torproject.org
Wed Sep 18 12:08:08 UTC 2019
commit 25af8ada30b84a0df19763bbc226ae209c38a1a0
Author: Nick Mathewson <nickm at torproject.org>
Date: Tue Sep 17 19:26:45 2019 -0400
Correct the syntax description for the MAPADDRESS command.
In 0.4.1.1-alpha I introduced a bug where we would require and
ignore a single positional argument.
Fixes bug 31772.
---
changes/ticket31772 | 4 ++++
src/feature/control/control_cmd.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/changes/ticket31772 b/changes/ticket31772
new file mode 100644
index 000000000..7847b3f74
--- /dev/null
+++ b/changes/ticket31772
@@ -0,0 +1,4 @@
+ o Minor bugfixes (controller protocol):
+ - Fix the MAPADDRESS controller command to accept one or more
+ arguments. Previously, it required two or more arguments, and ignored
+ the first. Fixes bug 31772; bugfix on 0.4.1.1-alpha.
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c
index abb579bd4..e0706ee4c 100644
--- a/src/feature/control/control_cmd.c
+++ b/src/feature/control/control_cmd.c
@@ -639,7 +639,9 @@ address_is_invalid_mapaddress_target(const char *addr)
}
static const control_cmd_syntax_t mapaddress_syntax = {
- .max_args=1,
+ // no positional arguments are expected
+ .max_args=0,
+ // an arbitrary number of K=V entries are supported.
.accept_keywords=true,
};
More information about the tor-commits
mailing list