Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e5dc53df76ec55fcdfab141d33a57b9bf1ca3b24
      
https://github.com/WebKit/WebKit/commit/e5dc53df76ec55fcdfab141d33a57b9bf1ca3b24
  Author: Per Arne Vollan <[email protected]>
  Date:   2026-10-10 (Sat, 10 Oct 2026)

  Changed paths:
    M Source/WebCore/platform/network/FormData.cpp
    M 
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UploadDirectory.mm

  Log Message:
  -----------
  REGRESSION (Safari/iOS 26.5.x): XHR/fetch send an empty request body 
(Content-Length: 0) for a disk-backed File when the page is controlled by a 
service worker
https://bugs.webkit.org/show_bug.cgi?id=319985
rdar://183071407

Reviewed by Sihui Liu.

XHR requests where the request body contains a reference to a file inside the 
IndexedDB Website data directory
associated with the initiating WebContent process, are being blocked by a check 
in FormDataReference. Since
the file is inside the Website data folder associated with the initiating 
WebContent process, this should be
allowed. Fix this by preferring to add files as blobs in 
FormData::appendMultiPartFileValue.

Additionally, there is an issue where the validation in FormDataReference will 
fail in the Service Worker
WebContent process on iOS, because the Networking process was not allowed to 
issue read extensions to files
referenced in the form data. This is being addressed in the Networking process 
sandbox.

Test: WebKit.UploadFileFromIndexedDB
      WebKit.UploadFileFromIndexedDBThroughServiceWorker

* Source/WebCore/platform/network/FormData.cpp:
(WebCore::FormData::appendMultiPartFileValue):
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UploadDirectory.mm:
(TEST(WebKit, UploadFileFromIndexedDB)):
(TEST(WebKit, UploadFileFromIndexedDBThroughServiceWorker)):

Canonical link: https://commits.webkit.org/323318@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to