[webkit-changes] [WebKit/WebKit] fc53ea: Remove CORS restriction on mixed content upgrades

Commit Queue noreply at github.com
Fri Jan 31 16:12:12 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc53eacf6a68602a99d29ed1a160f9b1c3a13697
      https://github.com/WebKit/WebKit/commit/fc53eacf6a68602a99d29ed1a160f9b1c3a13697
  Author: Matthew Finkel <m_finkel at apple.com>
  Date:   2025-01-31 (Fri, 31 Jan 2025)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/mixed-content/gen/top.meta/opt-in/img-tag.https-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/mixed-content/gen/top.meta/unset/img-tag.https-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https-expected.txt
    M Source/WebCore/loader/MixedContentChecker.cpp
    M Source/WebCore/loader/MixedContentChecker.h
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/QuirksData.h

  Log Message:
  -----------
  Remove CORS restriction on mixed content upgrades
https://bugs.webkit.org/show_bug.cgi?id=286624
rdar://124531208

Reviewed by Anne van Kesteren.

It turns out that we're not actually spec-compliant by requiring that requests
are non-CORS. This requirement is mentioned in the spec, but it is not actually
specified in any of the algorithms and was removed in
https://github.com/w3c/webappsec-mixed-content/pull/67. The spec still needs to
be cleaned up.

This change brings WebKit in-line with Chromium and Gecko on a few
upgrade-insecure-request WPT tests. We now begin failing a few
block-all-mixed-content tests because it is deprecated.

* LayoutTests/imported/w3c/web-platform-tests/mixed-content/gen/top.meta/opt-in/img-tag.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/mixed-content/gen/top.meta/unset/img-tag.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/img-tag.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/srcdoc-inherit.meta/unset/img-tag.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/top.meta/unset/img-tag.https-expected.txt:
* Source/WebCore/loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::shouldUpgradeInsecureContent):
* Source/WebCore/loader/MixedContentChecker.h:
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::updateRequestAfterRedirection):
(WebCore::CachedResourceLoader::requestResource):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::determineRelevantQuirks):
(WebCore::Quirks::needsRelaxedCorsMixedContentCheckQuirk const): Deleted.
(WebCore::handleTripAdvisorQuirks): Deleted.
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:

Canonical link: https://commits.webkit.org/289639@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