diff options
author | cypherpunks <cypherpunks@torproject.org> | 2018-09-03 13:51:29 +0000 |
---|---|---|
committer | cypherpunks <cypherpunks@torproject.org> | 2018-09-03 14:31:03 +0000 |
commit | f8c0f694b7f335358f612b0a26aae8b48110fa50 (patch) | |
tree | 46c0095a77a8538db28a8798b5fb798fbe5b554a /src/app | |
parent | d32b08af6f38d76d609edfddd44159446b5f25b6 (diff) | |
download | tor-f8c0f694b7f335358f612b0a26aae8b48110fa50.tar.gz tor-f8c0f694b7f335358f612b0a26aae8b48110fa50.zip |
app/config: reject non-UTF-8 ContactInfo
Closes ticket #27428.
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 339f8e2475..cd76efd45b 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -3381,6 +3381,9 @@ options_validate(or_options_t *old_options, or_options_t *options, log_notice(LD_CONFIG, "Your ContactInfo config option is not set. " "Please consider setting it, so we can contact you if your server is " "misconfigured or something else goes wrong."); + const char *ContactInfo = options->ContactInfo; + if (ContactInfo && !string_is_utf8(ContactInfo, strlen(ContactInfo))) + REJECT("ContactInfo config option must be UTF-8."); /* Special case on first boot if no Log options are given. */ if (!options->Logs && !options->RunAsDaemon && !from_setconf) { |