[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:40:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit de7c3d04364c4399c6e380af111d83f123b86443
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 15 10:39:07 2010 +0000
2010-10-15 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Xan Lopez.
[GTK] Do a stricter check for invalid base64 dataURLs
https://bugs.webkit.org/show_bug.cgi?id=47717
Restore the strict base64 decoding we added in
https://bugs.webkit.org/show_bug.cgi?id=44261 and then rolled back
in https://bugs.webkit.org/show_bug.cgi?id=47666 due to a failing
test. The actual issue was that we were not finishing the load of
the resource gracefully when an error happened.
Loading invalid base64-encoded data:// URLs are now handled
properly.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::parseDataUrl):
* platform/network/soup/cache/soup-request-data.c:
(webkit_soup_request_data_send):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 83752cf..4fd9532 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-10-15 Sergio Villar Senin <svillar at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Do a stricter check for invalid base64 dataURLs
+ https://bugs.webkit.org/show_bug.cgi?id=47717
+
+ Restore the strict base64 decoding we added in
+ https://bugs.webkit.org/show_bug.cgi?id=44261 and then rolled back
+ in https://bugs.webkit.org/show_bug.cgi?id=47666 due to a failing
+ test. The actual issue was that we were not finishing the load of
+ the resource gracefully when an error happened.
+
+ Loading invalid base64-encoded data:// URLs are now handled
+ properly.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::parseDataUrl):
+ * platform/network/soup/cache/soup-request-data.c:
+ (webkit_soup_request_data_send):
+
2010-10-15 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index d5cb1da..0d62de4 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -348,12 +348,14 @@ static gboolean parseDataUrl(gpointer callbackData)
d->m_soupRequest = adoptPlatformRef(webkit_soup_requester_request(d->m_requester.get(), handle->firstRequest().url().string().utf8().data(), session, &error.outPtr()));
if (error) {
d->m_soupRequest = 0;
+ client->didFinishLoading(handle, 0);
return false;
}
d->m_inputStream = adoptPlatformRef(webkit_soup_request_send(d->m_soupRequest.get(), 0, &error.outPtr()));
if (error) {
d->m_inputStream = 0;
+ client->didFinishLoading(handle, 0);
return false;
}
diff --git a/WebCore/platform/network/soup/cache/soup-request-data.c b/WebCore/platform/network/soup/cache/soup-request-data.c
index 463fcef..ced5c4a 100644
--- a/WebCore/platform/network/soup/cache/soup-request-data.c
+++ b/WebCore/platform/network/soup/cache/soup-request-data.c
@@ -98,9 +98,15 @@ webkit_soup_request_data_send (WebKitSoupRequest *request,
guchar *buf;
if (base64) {
- buf = g_base64_decode (start, &data->priv->content_length);
-
- if (!buf || data->priv->content_length <= 0) {
+ int inlen, state = 0;
+ guint save = 0;
+
+ inlen = strlen (start);
+ buf = g_malloc0 (inlen * 3 / 4 + 3);
+ data->priv->content_length =
+ g_base64_decode_step (start, inlen, buf,
+ &state, &save);
+ if (state != 0) {
g_free (buf);
goto fail;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list