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
d3308e6f
Commit
d3308e6f
authored
May 06, 2013
by
Daniel Lehman
Committed by
Alexandre Julliard
May 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Only accept proxy and proxy bypass if type is INTERNET_OPEN_TYPE_PROXY.
parent
73895b32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
internet.c
dlls/wininet/internet.c
+8
-2
http.c
dlls/wininet/tests/http.c
+9
-1
No files found.
dlls/wininet/internet.c
View file @
d3308e6f
...
...
@@ -1015,6 +1015,11 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
/* Clear any error information */
INTERNET_SetLastError
(
0
);
if
((
dwAccessType
==
INTERNET_OPEN_TYPE_PROXY
)
&&
!
lpszProxy
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
lpwai
=
alloc_object
(
NULL
,
&
APPINFOVtbl
,
sizeof
(
appinfo_t
));
if
(
!
lpwai
)
{
SetLastError
(
ERROR_OUTOFMEMORY
);
...
...
@@ -1031,9 +1036,10 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
lpwai
->
agent
=
heap_strdupW
(
lpszAgent
);
if
(
dwAccessType
==
INTERNET_OPEN_TYPE_PRECONFIG
)
INTERNET_ConfigureProxy
(
lpwai
);
else
else
if
(
dwAccessType
==
INTERNET_OPEN_TYPE_PROXY
)
{
lpwai
->
proxy
=
heap_strdupW
(
lpszProxy
);
lpwai
->
proxyBypass
=
heap_strdupW
(
lpszProxyBypass
);
lpwai
->
proxyBypass
=
heap_strdupW
(
lpszProxyBypass
);
}
TRACE
(
"returning %p
\n
"
,
lpwai
);
...
...
dlls/wininet/tests/http.c
View file @
d3308e6f
...
...
@@ -2170,7 +2170,7 @@ out:
static
void
test_proxy_direct
(
int
port
)
{
HINTERNET
hi
,
hc
,
hr
;
DWORD
r
,
sz
;
DWORD
r
,
sz
,
error
;
char
buffer
[
0x40
],
*
url
;
WCHAR
bufferW
[
0x40
];
static
CHAR
username
[]
=
"mike"
,
...
...
@@ -2181,6 +2181,14 @@ static void test_proxy_direct(int port)
passwordW
[]
=
{
'1'
,
'1'
,
'0'
,
'1'
,
0
},
useragentW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
0
};
/* specify proxy type without the proxy and bypass */
SetLastError
(
0xdeadbeef
);
hi
=
InternetOpen
(
NULL
,
INTERNET_OPEN_TYPE_PROXY
,
NULL
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
error
==
ERROR_INVALID_PARAMETER
||
broken
(
error
==
ERROR_SUCCESS
)
/* WinXPProSP2 */
,
"got %u
\n
"
,
error
);
ok
(
hi
==
NULL
||
broken
(
!!
hi
)
/* WinXPProSP2 */
,
"open should have failed
\n
"
);
sprintf
(
buffer
,
"localhost:%d
\n
"
,
port
);
hi
=
InternetOpen
(
NULL
,
INTERNET_OPEN_TYPE_PROXY
,
buffer
,
NULL
,
0
);
ok
(
hi
!=
NULL
,
"open failed
\n
"
);
...
...
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