diff options
author | Nick Mathewson <nickm@torproject.org> | 2022-06-16 14:35:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2022-06-16 14:35:38 -0400 |
commit | 0eb21427c95da6d67778080d3da0b858e077104a (patch) | |
tree | da135fb46850e3b7e0a8085fb6c24e14f7d6c607 | |
parent | 1d6470a2a83ca6bab8c52bcff5d0969b1866a4df (diff) | |
download | tor-0eb21427c95da6d67778080d3da0b858e077104a.tar.gz tor-0eb21427c95da6d67778080d3da0b858e077104a.zip |
Don't add redundant quotes with escaped() in log messages.
The escaped() function and its kin already wrap their output in
quotes: there's no reason to do so twice.
I am _NOT_ making a corresponding change in calls that make the same
mistake in controller-related functions, however, due to the risk of
a compatibility break. :(
Closes #22723.
-rw-r--r-- | changes/log-quotes | 3 | ||||
-rw-r--r-- | src/feature/dirauth/process_descs.c | 2 | ||||
-rw-r--r-- | src/feature/relay/dns.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/changes/log-quotes b/changes/log-quotes new file mode 100644 index 0000000000..7c9308eb44 --- /dev/null +++ b/changes/log-quotes @@ -0,0 +1,3 @@ + o Minor bugfixes (logging): + - Avoid ""double-quoting"" strings in several log messages. + Fixes bug 22723; bugfix on 0.1.2.2-alpha. diff --git a/src/feature/dirauth/process_descs.c b/src/feature/dirauth/process_descs.c index 7d61247e23..6a9cc5e95f 100644 --- a/src/feature/dirauth/process_descs.c +++ b/src/feature/dirauth/process_descs.c @@ -110,7 +110,7 @@ add_rsa_fingerprint_to_dir(const char *fp, authdir_config_t *list, tor_strstrip(fingerprint, " "); if (base16_decode(d, DIGEST_LEN, fingerprint, strlen(fingerprint)) != DIGEST_LEN) { - log_warn(LD_DIRSERV, "Couldn't decode fingerprint \"%s\"", + log_warn(LD_DIRSERV, "Couldn't decode fingerprint %s", escaped(fp)); tor_free(fingerprint); return -1; diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c index 4ae4a8e4b9..be226f4815 100644 --- a/src/feature/relay/dns.c +++ b/src/feature/relay/dns.c @@ -768,11 +768,11 @@ dns_resolve_impl,(edge_connection_t *exitconn, int is_resolve, if (!is_reverse || !is_resolve) { if (!is_reverse) - log_info(LD_EXIT, "Bad .in-addr.arpa address \"%s\"; sending error.", + log_info(LD_EXIT, "Bad .in-addr.arpa address %s; sending error.", escaped_safe_str(exitconn->base_.address)); else if (!is_resolve) log_info(LD_EXIT, - "Attempt to connect to a .in-addr.arpa address \"%s\"; " + "Attempt to connect to a .in-addr.arpa address %s; " "sending error.", escaped_safe_str(exitconn->base_.address)); |