aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-04 17:28:54 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-04 17:28:54 -0500
commit8ef6cdc39f047a7579858a6e23629c1c2718fc0a (patch)
tree57c354fe35b3f1055af1459955a939be582ea845 /src/or/config.c
parent0872d8e3cf3281fc5831375252db9e39de12e927 (diff)
downloadtor-8ef6cdc39f047a7579858a6e23629c1c2718fc0a.tar.gz
tor-8ef6cdc39f047a7579858a6e23629c1c2718fc0a.zip
Prevent changes to other options from removing . from AutomapHostsSuffixes
This happened because we changed AutomapHostsSuffixes to replace "." with "", since a suffix of "" means "match everything." But our option handling code for CSV options likes to remove empty entries when it re-parses stuff. Instead, let "." remain ".", and treat it specially when we're checking for a match. Fixes bug 12509; bugfix on 0.2.0.1-alpha.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 892108278e..b047b12717 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3398,15 +3398,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
AF_INET6, 1, msg)<0)
return -1;
- if (options->AutomapHostsSuffixes) {
- SMARTLIST_FOREACH(options->AutomapHostsSuffixes, char *, suf,
- {
- size_t len = strlen(suf);
- if (len && suf[len-1] == '.')
- suf[len-1] = '\0';
- });
- }
-
if (options->TestingTorNetwork &&
!(options->DirAuthorities ||
(options->AlternateDirAuthority &&