mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 11:07:17 +00:00
mshtml: Handle protocols with no ports when checking target origin.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
11cc7af2e6
commit
0db9f33b7d
|
@ -3161,6 +3161,7 @@ static HRESULT WINAPI window_private_matchMedia(IWineHTMLWindowPrivate *iface, B
|
|||
|
||||
static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_origin)
|
||||
{
|
||||
BOOL no_port = FALSE;
|
||||
IUri *uri, *target;
|
||||
DWORD port, port2;
|
||||
BSTR bstr, bstr2;
|
||||
|
@ -3219,11 +3220,20 @@ static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_
|
|||
goto done;
|
||||
|
||||
hres = IUri_GetPort(uri, &port);
|
||||
if(hres != S_OK)
|
||||
if(hres != S_OK) {
|
||||
if(FAILED(hres))
|
||||
goto done;
|
||||
no_port = TRUE; /* some protocols don't have ports (e.g. res) */
|
||||
}
|
||||
hres = IUri_GetPort(target, &port2);
|
||||
if(hres == S_OK && port != port2)
|
||||
if(hres != S_OK) {
|
||||
if(FAILED(hres))
|
||||
goto done;
|
||||
if(no_port)
|
||||
hres = S_OK;
|
||||
}else if(no_port || port != port2) {
|
||||
hres = S_FALSE;
|
||||
}
|
||||
|
||||
done:
|
||||
IUri_Release(target);
|
||||
|
|
Loading…
Reference in a new issue