Index: src/plugin/PluginWbPassThrough.cpp |
=================================================================== |
--- a/src/plugin/PluginWbPassThrough.cpp |
+++ b/src/plugin/PluginWbPassThrough.cpp |
@@ -152,7 +152,15 @@ |
LPOLESTR domainRetrieved = 0; |
if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0) |
{ |
- HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1, &resLen); |
+ HRESULT hr = S_OK; |
+ if (CPluginClient::GetInstance()->GetIEVersion() > 8) |
+ { |
+ hr = pOIBindInfo->GetBindString(BINDSTRING_ROOTDOC_URL, &domainRetrieved, 1, &resLen); |
+ } |
+ else |
+ { |
+ hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1, &resLen); |
+ } |
if ((hr == S_OK) && domainRetrieved && (resLen > 0)) |
{ |
@@ -207,10 +215,25 @@ |
} |
} |
- |
+ // Request from unknown thread, so we don't know the tab |
if (tab == NULL) |
{ |
contentType = GetContentType(mimeType, boundDomain, src); |
+ |
+ if (CPluginClient::GetInstance()->GetIEVersion() > 8) |
+ { |
+ // Find tab based on document URL |
+ tab = CPluginClass::GetTab(boundDomain.GetString()); |
+ if ((tab != 0) && (tab->IsFrameCached(src))) |
+ { |
+ contentType = CFilter::contentTypeSubdocument; |
+ // add frame to a referrer chain |
+ if (client->ShouldBlock(boundDomain, contentType, tab->GetDocumentUrl(), true)) |
+ { |
+ isBlocked = true; |
+ } |
+ } |
+ } |
if (client->ShouldBlock(src, contentType, boundDomain, true)) |
{ |
isBlocked = true; |