[webkit-changes] [WebKit/WebKit] c7835f: HTTPS-Only should support redirects from https to ...

Matthew Finkel noreply at github.com
Tue Aug 22 16:32:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c7835fe0090377aaa29fef6ba00e7c41e62b9021
      https://github.com/WebKit/WebKit/commit/c7835fe0090377aaa29fef6ba00e7c41e62b9021
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm

  Log Message:
  -----------
  HTTPS-Only should support redirects from https to http
https://bugs.webkit.org/show_bug.cgi?id=260294
rdar://107491418

Reviewed by Alex Christensen.

The current implementation only allows loading a HTTP URL if the current URL is
HTTP. That isn't correct because we could receive a request for loading a HTTPS
URL with same-site bypass enabled, and then the HTTPS URL redirects to a HTTP
URL. In this case, we should continue loading the HTTP URL.

This patch adapts and extends the existing test for this behavior.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldUpgradeRequestforHTTPSOnly const):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(TEST):

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




More information about the webkit-changes mailing list