| Index: src/plugin/PluginWbPassThrough.cpp |
| =================================================================== |
| --- a/src/plugin/PluginWbPassThrough.cpp |
| +++ b/src/plugin/PluginWbPassThrough.cpp |
| @@ -11,6 +11,7 @@ |
| #include "PluginSystem.h" |
| #include "Wrapper.h" |
| #include "PluginUtil.h" |
| +#include "../shared/Utils.h" |
| #include "wtypes.h" |
| @@ -106,7 +107,7 @@ |
| { |
| // No referer or mime type |
| // BINDSTRING_XDR_ORIGIN works only for IE v8+ |
| - if (mimeType.empty() && domain.empty() && CPluginClient::GetInstance()->GetIEVersion() >= 8) |
|
Oleksandr
2014/06/22 21:53:17
The means we would falsely classify requests as Xm
|
| + if ( mimeType.empty() && domain.empty() ) |
| { |
| return CFilter::contentTypeXmlHttpRequest; |
| } |
| @@ -226,53 +227,45 @@ |
| #endif |
| //Fixes the iframe back button issue |
| - if (client->GetIEVersion() > 6) |
| + if ((contentType == CFilter::contentTypeImage) && (isBlocked)) |
| { |
| - if ((contentType == CFilter::contentTypeImage) && (isBlocked)) |
| + m_shouldBlock = true; |
| + BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| + |
| + return INET_E_REDIRECT_FAILED; |
| + |
| + } |
| + if (((contentType == CFilter::contentTypeSubdocument))&& (isBlocked)) |
| + { |
| + m_shouldBlock = true; |
| + BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| + |
| + m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"text/html"); |
| + |
| + //Here we check if we are running on Windows 8 Consumer Preview. |
| + //For some reason on that environment the next line causes IE to crash |
| + if (CPluginSettings::GetInstance()->GetWindowsBuildNumber() != 8250) |
| { |
| - m_shouldBlock = true; |
| - BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| + m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"res://mshtml.dll/blank.htm"); |
| + } |
| - return INET_E_REDIRECT_FAILED; |
| + return INET_E_REDIRECT_FAILED; |
| + } |
| + if (((contentType == CFilter::contentTypeScript))&& (isBlocked)) |
| + { |
| + m_shouldBlock = true; |
| + BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| + m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"text/javascript"); |
| + m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"data:"); |
| + return INET_E_REDIRECT_FAILED; |
| + } |
| + if ((isBlocked)) |
| + { |
| + m_shouldBlock = true; |
| + BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| + m_spInternetProtocolSink->ReportResult(S_FALSE, 0, L""); |
| - } |
| - if (((contentType == CFilter::contentTypeSubdocument))&& (isBlocked)) |
| - { |
| - m_shouldBlock = true; |
| - BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| - |
| - m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"text/html"); |
| - |
| - //Here we check if we are running on Windows 8 Consumer Preview. |
| - //For some reason on that environment the next line causes IE to crash |
| - if (CPluginSettings::GetInstance()->GetWindowsBuildNumber() != 8250) |
| - { |
| - m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"res://mshtml.dll/blank.htm"); |
| - } |
| - |
| - return INET_E_REDIRECT_FAILED; |
| - } |
| - if (((contentType == CFilter::contentTypeScript))&& (isBlocked)) |
| - { |
| - m_shouldBlock = true; |
| - BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| - m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"text/javascript"); |
| - m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"data:"); |
| - return INET_E_REDIRECT_FAILED; |
| - } |
| - if ((isBlocked)) |
| - { |
| -/* WCHAR tmp[256]; |
| - wsprintf(tmp, L"URL: %s, domain: %s, mime: %s, type: %d", szUrl, boundDomain, mimeType, contentType); |
| - MessageBox(NULL, tmp, L"", MB_OK); |
| - contentType = GetContentType(mimeType, boundDomain, src); |
| -*/ |
| - m_shouldBlock = true; |
| - BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTargetProtocol); |
| - m_spInternetProtocolSink->ReportResult(S_FALSE, 0, L""); |
| - |
| - return INET_E_REDIRECT_FAILED; |
| - } |
| + return INET_E_REDIRECT_FAILED; |
| } |
| #endif // SUPPORT_FILTER |