Skip to content
Snippets Groups Projects
Commit b3affc23 authored by cypherpunks's avatar cypherpunks
Browse files

dirparse: reject routerstatus entries with malformed protover

Contrary to its name, protover_contains_long_protocol_names()
detects all parse errors, not just long names.
parent 5d330997
No related branches found
No related tags found
2 merge requests!101Reject extra commas in protover (backport),!94Reject extra commas in protover
......@@ -13,6 +13,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/or/protover.h"
#include "core/or/versions.h"
#include "feature/client/entrynodes.h"
#include "feature/dirauth/dirvote.h"
......@@ -451,6 +452,10 @@ routerstatus_parse_entry_from_string(memarea_t *area,
}
}
// If the protover line is malformed, reject this routerstatus.
if (protocols && protover_contains_long_protocol_names(protocols)) {
goto err;
}
summarize_protover_flags(&rs->pv, protocols, version);
}
......
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