Bug 47717

Summary: [GTK] Do a stricter check for invalid base64 dataURLs
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Fix for the bug none

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.