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
448e939e
Commit
448e939e
authored
Mar 18, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Embed user/password in uri used to create a moniker.
parent
d8a86da6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
8 deletions
+53
-8
httprequest.c
dlls/msxml3/httprequest.c
+53
-8
No files found.
dlls/msxml3/httprequest.c
View file @
448e939e
...
...
@@ -619,8 +619,27 @@ static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface,
HWND
*
hwnd
,
LPWSTR
*
username
,
LPWSTR
*
password
)
{
BindStatusCallback
*
This
=
impl_from_IAuthenticate
(
iface
);
FIXME
(
"(%p)->(%p %p %p)
\n
"
,
This
,
hwnd
,
username
,
password
);
return
E_NOTIMPL
;
httprequest
*
request
=
This
->
request
;
TRACE
(
"(%p)->(%p %p %p)
\n
"
,
This
,
hwnd
,
username
,
password
);
if
(
request
->
user
&&
*
request
->
user
)
{
if
(
hwnd
)
*
hwnd
=
NULL
;
*
username
=
CoTaskMemAlloc
(
SysStringByteLen
(
request
->
user
)
+
sizeof
(
WCHAR
));
*
password
=
CoTaskMemAlloc
(
SysStringByteLen
(
request
->
password
)
+
sizeof
(
WCHAR
));
if
(
!*
username
||
!*
password
)
{
CoTaskMemFree
(
*
username
);
CoTaskMemFree
(
*
password
);
return
E_OUTOFMEMORY
;
}
memcpy
(
*
username
,
request
->
user
,
SysStringByteLen
(
request
->
user
)
+
sizeof
(
WCHAR
));
memcpy
(
*
password
,
request
->
password
,
SysStringByteLen
(
request
->
password
)
+
sizeof
(
WCHAR
));
}
return
S_OK
;
}
static
const
IAuthenticateVtbl
AuthenticateVtbl
=
{
...
...
@@ -882,12 +901,6 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
return
hr
;
}
This
->
uri
=
uri
;
VariantInit
(
&
is_async
);
hr
=
VariantChangeType
(
&
is_async
,
&
async
,
0
,
VT_BOOL
);
This
->
async
=
hr
==
S_OK
&&
V_BOOL
(
&
is_async
);
VariantInit
(
&
str
);
hr
=
VariantChangeType
(
&
str
,
&
user
,
0
,
VT_BSTR
);
if
(
hr
==
S_OK
)
...
...
@@ -898,6 +911,38 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
if
(
hr
==
S_OK
)
This
->
password
=
V_BSTR
(
&
str
);
/* add authentication info */
if
(
This
->
user
&&
*
This
->
user
)
{
IUriBuilder
*
builder
;
hr
=
CreateIUriBuilder
(
uri
,
0
,
0
,
&
builder
);
if
(
hr
==
S_OK
)
{
IUri
*
full_uri
;
IUriBuilder_SetUserName
(
builder
,
This
->
user
);
IUriBuilder_SetPassword
(
builder
,
This
->
password
);
hr
=
IUriBuilder_CreateUri
(
builder
,
-
1
,
0
,
0
,
&
full_uri
);
if
(
hr
==
S_OK
)
{
IUri_Release
(
uri
);
uri
=
full_uri
;
}
else
WARN
(
"failed to create modified uri, 0x%08x
\n
"
,
hr
);
IUriBuilder_Release
(
builder
);
}
else
WARN
(
"IUriBuilder creation failed, 0x%08x
\n
"
,
hr
);
}
This
->
uri
=
uri
;
VariantInit
(
&
is_async
);
hr
=
VariantChangeType
(
&
is_async
,
&
async
,
0
,
VT_BOOL
);
This
->
async
=
hr
==
S_OK
&&
V_BOOL
(
&
is_async
);
httprequest_setreadystate
(
This
,
READYSTATE_LOADING
);
return
S_OK
;
...
...
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