Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
99a7ed9f
Commit
99a7ed9f
authored
Feb 17, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: When cracking a cookie url discard the webpage and ensure at least a path of '/'.
parent
8aa93c41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
cookie.c
dlls/wininet/cookie.c
+17
-1
No files found.
dlls/wininet/cookie.c
View file @
99a7ed9f
...
...
@@ -181,6 +181,7 @@ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
static
BOOL
COOKIE_crackUrlSimple
(
LPCWSTR
lpszUrl
,
LPWSTR
hostName
,
int
hostNameLen
,
LPWSTR
path
,
int
pathLen
)
{
URL_COMPONENTSW
UrlComponents
;
BOOL
rc
;
UrlComponents
.
lpszExtraInfo
=
NULL
;
UrlComponents
.
lpszPassword
=
NULL
;
...
...
@@ -195,7 +196,22 @@ static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName
UrlComponents
.
dwHostNameLength
=
hostNameLen
;
UrlComponents
.
dwUrlPathLength
=
pathLen
;
return
InternetCrackUrlW
(
lpszUrl
,
0
,
0
,
&
UrlComponents
);
rc
=
InternetCrackUrlW
(
lpszUrl
,
0
,
0
,
&
UrlComponents
);
/* discard the webpage off the end of the path */
if
(
pathLen
>
0
&&
path
[
pathLen
-
1
]
!=
'/'
)
{
LPWSTR
ptr
;
ptr
=
strrchrW
(
path
,
'/'
);
if
(
ptr
)
*
(
++
ptr
)
=
0
;
else
{
path
[
0
]
=
'/'
;
path
[
1
]
=
0
;
}
}
return
rc
;
}
/* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment