[webkit-changes] [WebKit/WebKit] 2408b7: Allow upgrade requests in mixed content if the sch...
Basuke Suzuki
noreply at github.com
Fri Oct 25 11:55:15 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2408b78fe65465e82a7b3b00a80f2327938fb3f1
https://github.com/WebKit/WebKit/commit/2408b78fe65465e82a7b3b00a80f2327938fb3f1
Author: Basuke Suzuki <basuke at apple.com>
Date: 2024-10-25 (Fri, 25 Oct 2024)
Changed paths:
M Source/WebCore/loader/MixedContentChecker.cpp
M Source/WebCore/loader/MixedContentChecker.h
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebCore/MixedContentChecker.cpp
Log Message:
-----------
Allow upgrade requests in mixed content if the scheme is handled by scheme handler.
https://bugs.webkit.org/show_bug.cgi?id=281883
rdar://131077815
Reviewed by Matthew Finkel.
In 274409 at main, request upgrade in mixed content was implemented strictly following the spec.
https://www.w3.org/TR/mixed-content/#upgrade-algorithm
But for the compatibility of WKWebView, request upgrade should be allowed when the request is handled by special scheme handler.
This patch adds exception for the upgradable check in MixedContentChecker::shouldUpgradeInsecureContent().
Also adding first API test for MixedContentChecker by extracting the check for easier unit testing.
* Source/WebCore/loader/MixedContentChecker.cpp:
(WebCore::destinationIsImageAndInitiatorIsImageset):
(WebCore::MixedContentChecker::shouldUpgradeInsecureContent):
(WebCore::MixedContentChecker::canModifyRequest):
* Source/WebCore/loader/MixedContentChecker.h:
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/MixedContentChecker.cpp: Added.
(TestWebKitAPI::TEST(MixedContentChecker, CanModifyRequest)):
Canonical link: https://commits.webkit.org/285709@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