Allow using XMLHTTP ActiveX object with custom scheme handlers

Fix the problem of the access-denied error when using a 'new
window.ActiveXObject("Microsoft.XMLHTTP")' to access URIs from custom
WebView scheme handler of the Internet Explorer WebView.

The solution here is to implement PARSE_SECURITY_URL and
PARSE_SECURITY_DOMAIN in ParseUrl of the IInternetProtocolInfo interface
of the Internet Explorer Control.

The direct implementation of VirtualProtocol::QueryInterface() instead
of using IMPLEMENT_IUNKNOWN_METHODS works, but is not nice. The better
approach would be probably enhancing ADD_RAW_IID to support multiple
inheritance.

Closes #17893.
This commit is contained in:
michael
2020-07-19 14:25:37 +02:00
committed by Vadim Zeitlin
parent 2e51076159
commit 6023925ef6
3 changed files with 188 additions and 2 deletions

View File

@@ -136,6 +136,38 @@ public:
DWORD dwReserved) = 0;
};
class wxIInternetProtocolInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE ParseUrl(LPCWSTR pwzUrl,
PARSEACTION ParseAction,
DWORD dwParseFlags,
LPWSTR pwzResult,
DWORD cchResult,
DWORD *pcchResult,
DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE CombineUrl(LPCWSTR pwzBaseUrl,
LPCWSTR pwzRelativeUrl,
DWORD dwCombineFlags,
LPWSTR pwzResult,
DWORD cchResult,
DWORD *pcchResult,
DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE CompareUrl(LPCWSTR pwzUrl1,
LPCWSTR pwzUrl2,
DWORD dwCompareFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryInfo(LPCWSTR pwzUrl,
QUERYOPTION OueryOption,
DWORD dwQueryFlags,
LPVOID pBuffer,
DWORD cbBuffer,
DWORD *pcbBuf,
DWORD dwReserved) = 0;
};
/* end of urlmon.h */
/* mshtmhst.h */