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.
oldstable
Henri Verbeet 2010-09-23 11:48:05 +02:00 committed by Alexandre Julliard
parent 7782e81887
commit 6e46e9048f
1 changed files with 6 additions and 4 deletions

View File

@ -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))
{