From: Julian Klemann jklemann@codeweavers.com
--- dlls/http.sys/http.c | 2 ++ dlls/httpapi/tests/httpapi.c | 4 ++++ 2 files changed, 6 insertions(+)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 4d2e10c90d9..e16805ccbdb 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -729,6 +729,8 @@ static NTSTATUS http_add_url(struct request_queue *queue, IRP *irp) return STATUS_INVALID_PARAMETER; if (!(addr.sin_port = htons(strtol(strchr(params->url + 7, ':') + 1, &endptr, 10))) || *endptr != '/') return STATUS_INVALID_PARAMETER; + if (strchr(params->url, '?')) + return STATUS_INVALID_PARAMETER;
if (!(url = malloc(strlen(params->url)+1))) return STATUS_NO_MEMORY; diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c index f52c584b93b..1d00aa22c50 100644 --- a/dlls/httpapi/tests/httpapi.c +++ b/dlls/httpapi/tests/httpapi.c @@ -1210,6 +1210,10 @@ static void test_v1_relative_urls(void) ret = HttpAddUrl(queue2, url2, NULL); ok(ret == ERROR_ALREADY_EXISTS, "Got error %u.\n", ret);
+ swprintf(url2, ARRAY_SIZE(url2), L"http://localhost:%u/barfoo?a=b", port); + ret = HttpAddUrl(queue2, url2, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "Got error %u.\n", ret); + ret = CloseHandle(queue); ok(ret, "Failed to close queue handle, error %lu.\n", GetLastError()); ret = CloseHandle(queue2);