Skip to content
Snippets Groups Projects
Commit 74cfe361 authored by George Kadianakis's avatar George Kadianakis
Browse files

Merge branch 'maint-0.4.5'

parents ceefdf98 4cbd22f1
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (logging):
- Reject obsolete router/extrainfo descs earlier and more quietly.
Fixes bug 40238; bugfix on 0.4.5.1-alpha.
\ No newline at end of file
......@@ -456,6 +456,12 @@ router_parse_entry_from_string(const char *s, const char *end,
}
}
if (!tor_memstr(s, end-s, "\nproto ")) {
log_debug(LD_DIR, "Found an obsolete router descriptor. "
"Rejecting quietly.");
goto err;
}
if (router_get_router_hash(s, end - s, digest) < 0) {
log_warn(LD_DIR, "Couldn't compute router hash.");
goto err;
......@@ -991,6 +997,11 @@ extrainfo_parse_entry_from_string(const char *s, const char *end,
while (end > s+2 && *(end-1) == '\n' && *(end-2) == '\n')
--end;
if (!tor_memstr(s, end-s, "\nidentity-ed25519")) {
log_debug(LD_DIR, "Found an obsolete extrainfo. Rejecting quietly.");
goto err;
}
if (router_get_extrainfo_hash(s, end-s, digest) < 0) {
log_warn(LD_DIR, "Couldn't compute router hash.");
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