Skip to content
Snippets Groups Projects
Commit 089137f0 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix a bug where seting allow_annotations==0 only ignores annotations, but does not block them

parent bad609ae
No related branches found
No related tags found
No related merge requests found
o Major bugfixes
- Do even more to reject (and not just ignore) annotations on
router descriptors received anywhere but from the cache.
Previously we would ignore such annotations at first, but cache
them to disk anyway. Bugfix on 0.2.0.8-alpha. Found by piebeer.
......@@ -1177,10 +1177,16 @@ router_parse_entry_from_string(const char *s, const char *end,
s = cp+1;
}
if (allow_annotations && start_of_annotations != s) {
if (tokenize_string(area,start_of_annotations,s,tokens,
routerdesc_token_table,TS_NOCHECK)) {
log_warn(LD_DIR, "Error tokenizing router descriptor (annotations).");
if (start_of_annotations != s) { /* We have annotations */
if (allow_annotations) {
if (tokenize_string(area,start_of_annotations,s,tokens,
routerdesc_token_table,TS_NOCHECK)) {
log_warn(LD_DIR, "Error tokenizing router descriptor (annotations).");
goto err;
}
} else {
log_warn(LD_DIR, "Found unexpected annotations on router descriptor not "
"loaded from disk. Dropping it.");
goto err;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment