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
8fe7be58
Commit
8fe7be58
authored
May 16, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Added IsDomainLegalCookieDomainW helper with substrings as arguments.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f39a2db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
cookie.c
dlls/wininet/cookie.c
+22
-22
No files found.
dlls/wininet/cookie.c
View file @
8fe7be58
...
@@ -867,40 +867,25 @@ BOOL WINAPI InternetGetCookieExA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
...
@@ -867,40 +867,25 @@ BOOL WINAPI InternetGetCookieExA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
*/
*/
BOOL
WINAPI
InternetGetCookieA
(
const
char
*
url
,
const
char
*
name
,
char
*
data
,
DWORD
*
size
)
BOOL
WINAPI
InternetGetCookieA
(
const
char
*
url
,
const
char
*
name
,
char
*
data
,
DWORD
*
size
)
{
{
TRACE
(
"(%s, %s, %
s, %p)
\n
"
,
debugstr_a
(
url
),
debugstr_a
(
name
),
debugstr_a
(
data
)
,
size
);
TRACE
(
"(%s, %s, %
p, %p)
\n
"
,
debugstr_a
(
url
),
debugstr_a
(
name
),
data
,
size
);
return
InternetGetCookieExA
(
url
,
name
,
data
,
size
,
0
,
NULL
);
return
InternetGetCookieExA
(
url
,
name
,
data
,
size
,
0
,
NULL
);
}
}
/***********************************************************************
static
BOOL
is_domain_legal_for_cookie
(
substr_t
domain
,
substr_t
full_domain
)
* IsDomainLegalCookieDomainW (WININET.@)
*/
BOOL
WINAPI
IsDomainLegalCookieDomainW
(
LPCWSTR
s1
,
LPCWSTR
s2
)
{
{
DWORD
s1_len
,
s2_len
;
const
WCHAR
*
ptr
;
FIXME
(
"(%s, %s) semi-stub
\n
"
,
debugstr_w
(
s1
),
debugstr_w
(
s2
));
if
(
!
domain
.
len
||
*
domain
.
str
==
'.'
||
!
full_domain
.
len
||
*
full_domain
.
str
==
'.'
)
{
if
(
!
s1
||
!
s2
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
s1
[
0
]
==
'.'
||
!
s1
[
0
]
||
s2
[
0
]
==
'.'
||
!
s2
[
0
])
{
SetLastError
(
ERROR_INVALID_NAME
);
SetLastError
(
ERROR_INVALID_NAME
);
return
FALSE
;
return
FALSE
;
}
}
if
(
!
strchrW
(
s1
,
'.'
)
||
!
strchrW
(
s2
,
'.'
))
return
FALSE
;
s1_len
=
strlenW
(
s1
);
if
(
domain
.
len
>
full_domain
.
len
||
!
memchrW
(
domain
.
str
,
'.'
,
domain
.
len
)
||
!
memchrW
(
full_domain
.
str
,
'.'
,
full_domain
.
len
))
s2_len
=
strlenW
(
s2
);
if
(
s1_len
>
s2_len
)
return
FALSE
;
return
FALSE
;
if
(
strncmpiW
(
s1
,
s2
+
s2_len
-
s1_len
,
s1_len
)
||
(
s2_len
>
s1_len
&&
s2
[
s2_len
-
s1_len
-
1
]
!=
'.'
))
ptr
=
full_domain
.
str
+
full_domain
.
len
-
domain
.
len
;
{
if
(
strncmpiW
(
domain
.
str
,
ptr
,
domain
.
len
)
||
(
full_domain
.
len
>
domain
.
len
&&
ptr
[
-
1
]
!=
'.'
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -908,6 +893,21 @@ BOOL WINAPI IsDomainLegalCookieDomainW( LPCWSTR s1, LPCWSTR s2 )
...
@@ -908,6 +893,21 @@ BOOL WINAPI IsDomainLegalCookieDomainW( LPCWSTR s1, LPCWSTR s2 )
return
TRUE
;
return
TRUE
;
}
}
/***********************************************************************
* IsDomainLegalCookieDomainW (WININET.@)
*/
BOOL
WINAPI
IsDomainLegalCookieDomainW
(
const
WCHAR
*
domain
,
const
WCHAR
*
full_domain
)
{
FIXME
(
"(%s, %s) semi-stub
\n
"
,
debugstr_w
(
domain
),
debugstr_w
(
full_domain
));
if
(
!
domain
||
!
full_domain
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
is_domain_legal_for_cookie
(
substrz
(
domain
),
substrz
(
full_domain
));
}
DWORD
set_cookie
(
const
WCHAR
*
domain
,
const
WCHAR
*
path
,
const
WCHAR
*
cookie_name
,
const
WCHAR
*
cookie_data
,
DWORD
flags
)
DWORD
set_cookie
(
const
WCHAR
*
domain
,
const
WCHAR
*
path
,
const
WCHAR
*
cookie_name
,
const
WCHAR
*
cookie_data
,
DWORD
flags
)
{
{
cookie_container_t
*
container
;
cookie_container_t
*
container
;
...
...
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