From 981d3693891404ffa0ba96d8750c3bc89f69d7b0 Mon Sep 17 00:00:00 2001 From: Baptiste DURAND Date: Fri, 5 Jul 2013 11:56:16 +0200 Subject: [PATCH] Return an error when we try to load an encrypted ressource if DECRYPT build Option is disabled. --- src/view/webkit/injected-bundle/wrt-injected-bundle.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp index c4c87d1..93d6d83 100644 --- a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp +++ b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp @@ -840,6 +840,7 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) if (m_encrypted) { int getFileSize; if (isEncryptedResource(checkUrl, getFileSize)) { +#ifdef DECRYPT std::string decryptString = DecryptResource(checkUrl, getFileSize); if (!decryptString.empty()) { @@ -864,6 +865,10 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) LogDebug("return value " << decryptString << "]]"); return req; } +#else + LogError("Encryption is not supported. (DECRYPT_SUPPORT option is disabled)"); + return NULL; +#endif } } WKURLRequestRef req = WKURLRequestCreateWithWKURL(tmpUrl); -- 2.7.4