Bug 47717 - [GTK] Do a stricter check for invalid base64 dataURLs
Summary: [GTK] Do a stricter check for invalid base64 dataURLs
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-10-15 03:08 PDT by Sergio Villar Senin
Modified: 2010-10-15 03:39 PDT (History)
2 users (show)

See Also:

Fix for the bug (3.14 KB, patch)
2010-10-15 03:19 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2010-10-15 03:08:07 PDT
In https://bugs.webkit.org/show_bug.cgi?id=47666 we rolled back a more strict version of base64 decoding added in https://bugs.webkit.org/show_bug.cgi?id=44261 because the test LayoutTests/editing/undo/orphaned-selection-crash-bug32823-2.html started to fail.

As commented here https://bugs.webkit.org/show_bug.cgi?id=47661#c10 the actual problem was not the test but the new code in ResourceHandleSoup.cpp that incorrectly does not finish the load of the dataURL if the base64 decoding fails.

We should restore the old strict base64 decoding and gracefully end the load when an error occurs.
Comment 1 Sergio Villar Senin 2010-10-15 03:19:33 PDT
Created attachment 70846 [details]
Fix for the bug

This patch both restores the more strict base64 decoding and it also allows ResourceHandleSoup to properly finish the load of the resource when invalid base64 data is provided.
Comment 2 Sergio Villar Senin 2010-10-15 03:20:19 PDT
Ryosuke might be interested in the fix
Comment 3 Xan Lopez 2010-10-15 03:23:01 PDT
Comment on attachment 70846 [details]
Fix for the bug

Looks good to me.
Comment 4 WebKit Commit Bot 2010-10-15 03:39:16 PDT
Comment on attachment 70846 [details]
Fix for the bug

Clearing flags on attachment: 70846

Committed r69848: <http://trac.webkit.org/changeset/69848>
Comment 5 WebKit Commit Bot 2010-10-15 03:39:21 PDT
All reviewed patches have been landed.  Closing bug.