 Issue 5113230347206656:
  Issue #1356 - Improve detection of the issuer of the request  (Closed)
    
  
    Issue 5113230347206656:
  Issue #1356 - Improve detection of the issuer of the request  (Closed) 
  | 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))) | 
| 
Eric
2014/10/08 17:37:54
Prefer nullptr to 0, but the idiom we're using (as
 | 
| + { | 
| + contentType = CFilter::contentTypeSubdocument; | 
| 
sergei
2014/10/09 13:46:22
I would leave the comment somewhere
- that it's on
 | 
| + // add frame to a referrer chain | 
| + if (client->ShouldBlock(boundDomain, contentType, tab->GetDocumentUrl(), true)) | 
| 
sergei
2014/10/09 13:46:22
Instead of `boundDomain` there should be `src`
 | 
| + { | 
| + isBlocked = true; | 
| + } | 
| + } | 
| + } | 
| if (client->ShouldBlock(src, contentType, boundDomain, true)) | 
| { | 
| isBlocked = true; |