Bug 209994

Summary: [iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty `mimeType` parameter
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, darin, thorton, useafterfree, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
none
Patch v2 none

David Kilzer (:ddkilzer)
Reported 2020-04-03 17:58:04 PDT
WebPageProxy::didCommitLoadForFrame should validate its `mimeType` parameter. <rdar://problem/60068700>
Attachments
Patch v1 (2.03 KB, patch)
2020-04-03 18:00 PDT, David Kilzer (:ddkilzer)
no flags
Patch v2 (4.20 KB, patch)
2020-04-07 15:33 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2020-04-03 18:00:32 PDT
Created attachment 395423 [details] Patch v1
David Kilzer (:ddkilzer)
Comment 2 2020-04-03 18:58:03 PDT
Looks like the mimeType parameter can be nil (nullptr) with these tests: TestWebKitAPI.WebKit.PendingAPIRequestURL TestWebKitAPI.WebKit.LoadDataWithNilMIMEType
David Kilzer (:ddkilzer)
Comment 3 2020-04-04 06:10:37 PDT
(In reply to David Kilzer (:ddkilzer) from comment #2) > Looks like the mimeType parameter can be nil (nullptr) with these tests: > > TestWebKitAPI.WebKit.PendingAPIRequestURL > TestWebKitAPI.WebKit.LoadDataWithNilMIMEType The api-ios bot only shows this test failing: TestWebKitAPI.WebKit.LoadDataWithNilMIMEType
David Kilzer (:ddkilzer)
Comment 4 2020-04-07 15:33:02 PDT
Created attachment 395751 [details] Patch v2
EWS
Comment 5 2020-04-08 10:51:18 PDT
Committed r259729: <https://trac.webkit.org/changeset/259729> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395751 [details].
Darin Adler
Comment 6 2020-04-08 11:49:38 PDT
Comment on attachment 395751 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=395751&action=review > Source/WebKit/UIProcess/mac/PageClientImplMac.mm:283 > + UNUSED_PARAM(mimeType); > + UNUSED_PARAM(useCustomContentProvider); Better to omit or comment out the argument names since that will give an error if we actually do use one, whereas if we use UNUSED_PARAM will keep compiling.
David Kilzer (:ddkilzer)
Comment 7 2020-04-08 13:05:41 PDT
(In reply to Darin Adler from comment #6) > Comment on attachment 395751 [details] > Patch v2 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=395751&action=review > > > Source/WebKit/UIProcess/mac/PageClientImplMac.mm:283 > > + UNUSED_PARAM(mimeType); > > + UNUSED_PARAM(useCustomContentProvider); > > Better to omit or comment out the argument names since that will give an > error if we actually do use one, whereas if we use UNUSED_PARAM will keep > compiling. Committed r259750: <https://trac.webkit.org/changeset/259750>
Note You need to log in before you can comment on or make changes to this bug.