aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-03-05 09:50:26 +0000
committerNick Mathewson <nickm@torproject.org>2006-03-05 09:50:26 +0000
commit5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854 (patch)
treee410cb36f9345a0aa46b735ca2128da55a68c152 /src/or/config.c
parent6a4e304d9e613b613e208bb0f11ec44c3fc30150 (diff)
downloadtor-5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854.tar
tor-5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854.tar.gz
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index b97c07fb8..fa6cb8e17 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -518,6 +518,16 @@ safe_str(const char *address)
return address;
}
+/** DOCDOC */
+const char *
+escaped_safe_str(const char *address)
+{
+ if (get_options()->SafeLogging)
+ return "[scrubbed]";
+ else
+ return escaped(address);
+}
+
/** Add the default directory servers directly into the trusted dir list. */
static void
add_default_trusted_dirservers(void)