Title: [184461] releases/WebKitGTK/webkit-2.4/Source/WebCore
- Revision
- 184461
- Author
- [email protected]
- Date
- 2015-05-18 04:29:26 -0700 (Mon, 18 May 2015)
Log Message
Merge r181074 - [SOUP] Check TLS errors as soon as they are set in the SoupMessage
https://bugs.webkit.org/show_bug.cgi?id=142244
Reviewed by Sergio Villar Senin.
Source/WebCore:
Connect to the notify::tls-errors signal of SoupMessage to cancel
the load earlier in case of TLS failure, preventing any private
data from being sent to the server before the TLS errors are checked.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::tlsErrorsChangedCallback):
(WebCore::gotHeadersCallback):
(WebCore::createSoupMessageForHandleAndRequest):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (184460 => 184461)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2015-05-18 11:27:48 UTC (rev 184460)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2015-05-18 11:29:26 UTC (rev 184461)
@@ -1,3 +1,19 @@
+2015-03-05 Carlos Garcia Campos <[email protected]>
+
+ [SOUP] Check TLS errors as soon as they are set in the SoupMessage
+ https://bugs.webkit.org/show_bug.cgi?id=142244
+
+ Reviewed by Sergio Villar Senin.
+
+ Connect to the notify::tls-errors signal of SoupMessage to cancel
+ the load earlier in case of TLS failure, preventing any private
+ data from being sent to the server before the TLS errors are checked.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::tlsErrorsChangedCallback):
+ (WebCore::gotHeadersCallback):
+ (WebCore::createSoupMessageForHandleAndRequest):
+
2015-03-03 Carlos Garcia Campos <[email protected]>
[SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (184460 => 184461)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp 2015-05-18 11:27:48 UTC (rev 184460)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp 2015-05-18 11:29:26 UTC (rev 184461)
@@ -330,16 +330,21 @@
return true;
}
-static void gotHeadersCallback(SoupMessage* message, gpointer data)
+static void tlsErrorsChangedCallback(SoupMessage* message, GParamSpec*, gpointer data)
{
ResourceHandle* handle = static_cast<ResourceHandle*>(data);
if (!handle || handle->cancelledOrClientless())
return;
- if (handleUnignoredTLSErrors(handle, message)) {
+ if (handleUnignoredTLSErrors(handle, message))
handle->cancel();
+}
+
+static void gotHeadersCallback(SoupMessage* message, gpointer data)
+{
+ ResourceHandle* handle = static_cast<ResourceHandle*>(data);
+ if (!handle || handle->cancelledOrClientless())
return;
- }
ResourceHandleInternal* d = handle->getInternal();
@@ -971,6 +976,7 @@
&& (!request.httpBody() || request.httpBody()->isEmpty()))
soup_message_headers_set_content_length(soupMessage->request_headers, 0);
+ g_signal_connect(d->m_soupMessage.get(), "notify::tls-errors", G_CALLBACK(tlsErrorsChangedCallback), handle);
g_signal_connect(d->m_soupMessage.get(), "got-headers", G_CALLBACK(gotHeadersCallback), handle);
g_signal_connect(d->m_soupMessage.get(), "wrote-body-data", G_CALLBACK(wroteBodyDataCallback), handle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes