Commit 6e46e904 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wininet: Cut of the query string before searching for the filename in CreateUrlCacheEntryW().

Apparently it's possible to receive URLs with e.g. slashes in the query string. I was under the impression those were reserved in the query string, but e.g. Firefox will happily accept them as well.
parent 7782e818
......@@ -2271,6 +2271,12 @@ BOOL WINAPI CreateUrlCacheEntryW(
if (((lpszUrlEnd - lpszUrlName) > 1) && (*(lpszUrlEnd - 1) == '/' || *(lpszUrlEnd - 1) == '\\'))
lpszUrlEnd--;
lpszUrlPart = memchrW(lpszUrlName, '?', lpszUrlEnd - lpszUrlName);
if (!lpszUrlPart)
lpszUrlPart = memchrW(lpszUrlName, '#', lpszUrlEnd - lpszUrlName);
if (lpszUrlPart)
lpszUrlEnd = lpszUrlPart;
for (lpszUrlPart = lpszUrlEnd;
(lpszUrlPart >= lpszUrlName);
lpszUrlPart--)
......@@ -2281,10 +2287,6 @@ BOOL WINAPI CreateUrlCacheEntryW(
lpszUrlPart++;
break;
}
else if(*lpszUrlPart == '?' || *lpszUrlPart == '#')
{
lpszUrlEnd = lpszUrlPart;
}
}
if (!lstrcmpW(lpszUrlPart, szWWW))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment