mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Fix a bug where seting allow_annotations==0 only ignores annotations, but does not block them
This commit is contained in:
parent
bad609ae6b
commit
089137f011
8
changes/annotations_fix
Normal file
8
changes/annotations_fix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
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;
|
s = cp+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allow_annotations && start_of_annotations != s) {
|
if (start_of_annotations != s) { /* We have annotations */
|
||||||
if (tokenize_string(area,start_of_annotations,s,tokens,
|
if (allow_annotations) {
|
||||||
routerdesc_token_table,TS_NOCHECK)) {
|
if (tokenize_string(area,start_of_annotations,s,tokens,
|
||||||
log_warn(LD_DIR, "Error tokenizing router descriptor (annotations).");
|
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;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user