if not separator is found in url, clean decoded_query_string (#12266)
Emmanuel Vasilakis committed
Feb 28, 2022 at 16:30 UTC
ddd57cd76764da62aa5a31eeec6b36107e84330b
1 file changed
+3
web/server/web_client.c
+3
@@ -1076,6 +1076,9 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) {
1076
if (url_parse_query_string(w->decoded_query_string, NETDATA_WEB_REQUEST_URL_SIZE + 1, ptr_variables, total_variables)) {
1077
return HTTP_VALIDATION_MALFORMED_URL;
1078
}
1079
+ } else {
1080
+ //make sure there's no leftovers from previous request on the same web client
1081
+ w->decoded_query_string[1]='\0';
1082
}
1083
}
1084
*ue = ' ';