Return an error when we try to load an encrypted ressource if DECRYPT build Option...
authorBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Fri, 5 Jul 2013 09:56:16 +0000 (11:56 +0200)
committerRusty Lynch <rusty.lynch@intel.com>
Mon, 8 Jul 2013 17:53:13 +0000 (10:53 -0700)
src/view/webkit/injected-bundle/wrt-injected-bundle.cpp

index c4c87d1..93d6d83 100644 (file)
@@ -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);