Merge branch 'tor-github/pr/1042'

This commit is contained in:
George Kadianakis 2019-05-27 14:22:01 +03:00
commit 0a86f14add
2 changed files with 9 additions and 3 deletions

4
changes/ticket30580 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (controller):
- POSTDESCRIPTOR requests should work again. Previously, they were
broken if a "purpose=" flag was specified. Fixes bug 30580;
bugfix on 0.4.1.1-alpha.

View File

@ -1049,10 +1049,12 @@ handle_control_postdescriptor(control_connection_t *conn,
line = config_line_find_case(args->kwargs, "purpose");
if (line) {
purpose = router_purpose_from_string(line->value);
if (purpose == ROUTER_PURPOSE_UNKNOWN) {
control_printf_endreply(conn, 552, "Unknown purpose \"%s\"",
line->value);
goto done;
}
}
line = config_line_find_case(args->kwargs, "cache");
if (line) {
if (!strcasecmp(line->value, "no"))