Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginWbPassThrough.cpp

Issue 5113230347206656: Issue #1356 - Improve detection of the issuer of the request (Closed)
Patch Set: Created Oct. 7, 2014, 9:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld