mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Refactor the safe_str_*() API to make more sense.
The new rule is: safe_str_X() means "this string is a piece of X information; make it safe to log." safe_str() on its own means "this string is a piece of who-knows-what; make it safe to log".
This commit is contained in:
+2
-2
@@ -1248,7 +1248,7 @@ handle_control_mapaddress(control_connection_t *conn, uint32_t len,
|
||||
smartlist_add(reply, ans);
|
||||
log_warn(LD_CONTROL,
|
||||
"Unable to allocate address for '%s' in MapAddress msg",
|
||||
safe_str(line));
|
||||
safe_str_client(line));
|
||||
} else {
|
||||
tor_snprintf(ans, anslen, "250-%s=%s", address, to);
|
||||
smartlist_add(reply, ans);
|
||||
@@ -1266,7 +1266,7 @@ handle_control_mapaddress(control_connection_t *conn, uint32_t len,
|
||||
smartlist_add(reply, ans);
|
||||
log_info(LD_CONTROL, "Skipping MapAddress '%s': wrong "
|
||||
"number of items.",
|
||||
safe_str(line));
|
||||
safe_str_client(line));
|
||||
}
|
||||
SMARTLIST_FOREACH(elts, char *, cp, tor_free(cp));
|
||||
smartlist_clear(elts);
|
||||
|
||||
Reference in New Issue
Block a user