[webkit-changes] [WebKit/WebKit] 240483: Invalid WTF::URLs should not convert to NSURLs

Alex Christensen noreply at github.com
Thu Feb 6 10:49:35 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2404832a74ce484dc64a981d5d2ef659db3ccbef
      https://github.com/WebKit/WebKit/commit/2404832a74ce484dc64a981d5d2ef659db3ccbef
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M LayoutTests/platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt
    M LayoutTests/platform/mac-wk1/fast/loader/window-open-to-invalid-url-disallowed-expected.txt
    M Source/WTF/wtf/cf/URLCF.cpp
    M Source/WTF/wtf/cocoa/NSURLExtras.mm
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
    M Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm

  Log Message:
  -----------
  Invalid WTF::URLs should not convert to NSURLs
https://bugs.webkit.org/show_bug.cgi?id=286926

Reviewed by John Wilander.

Creating valid NSURLs from invalid WTF::URLs has long been a source
of issues that we find more targeted fixes for.  We do this over and
over again in different places.  This will fix all of them.

A sprinkling of little fixes is needed to keep some of the failures
the same as they were before, but this also intends to change some
of the URLs accessed after putting them into WebKit when WebKit
thinks they are not valid.

To mitigate the binary compatibility effects of this change, I did
the important changes behind a linkedOnOrAfterSDKWithBehavior check.

* Source/WTF/wtf/cf/URLCF.cpp:
(WTF::URL::createCFURL const):
(WTF::URL::fileSystemPath const):
(WTF::URL::emptyCFURL): Deleted.

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



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


More information about the webkit-changes mailing list