forked from Mirrors/wine-wine
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
parent
7782e81887
commit
6e46e9048f
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue