From 31e53584db5879894809fbde5445aac7553ac3e2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 23 Jun 2020 16:13:50 +0200 Subject: escape: make the URL decode able to reject only %00 bytes ... or all "control codes" or nothing. Assisted-by: Nicolas Sterchele --- lib/mqtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/mqtt.c') diff --git a/lib/mqtt.c b/lib/mqtt.c index d09aab4ee..f6f441614 100644 --- a/lib/mqtt.c +++ b/lib/mqtt.c @@ -211,7 +211,8 @@ static CURLcode mqtt_get_topic(struct connectdata *conn, char *path = conn->data->state.up.path; if(strlen(path) > 1) { - result = Curl_urldecode(conn->data, path + 1, 0, topic, topiclen, FALSE); + result = Curl_urldecode(conn->data, path + 1, 0, topic, topiclen, + REJECT_NADA); } else { failf(conn->data, "Error: No topic specified."); -- cgit v1.2.1