[webkit-changes] [WebKit/WebKit] e0227f: [Cocoa] Refactor logic for lookalike character san...
Wenson Hsieh
noreply at github.com
Wed Dec 14 15:04:49 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e0227fc7d5f7ad63bff6514bf21f77134eddeb64
https://github.com/WebKit/WebKit/commit/e0227fc7d5f7ad63bff6514bf21f77134eddeb64
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2022-12-14 (Wed, 14 Dec 2022)
Changed paths:
M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
M Source/WebCore/PAL/pal/PlatformMac.cmake
A Source/WebCore/PAL/pal/cocoa/NetworkConnectionIntegritySoftLink.h
A Source/WebCore/PAL/pal/cocoa/NetworkConnectionIntegritySoftLink.mm
A Source/WebCore/PAL/pal/spi/cocoa/NetworkConnectionIntegritySPI.h
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
A Source/WebKit/NetworkProcess/cocoa/NetworkConnectionIntegrityHelpers.h
A Source/WebKit/NetworkProcess/cocoa/NetworkConnectionIntegrityHelpers.mm
M Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
Log Message:
-----------
[Cocoa] Refactor logic for lookalike character sanitization when copying or sharing links
https://bugs.webkit.org/show_bug.cgi?id=249244
rdar://103314642
Reviewed by Aditya Keerthi.
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/PlatformMac.cmake:
* Source/WebCore/PAL/pal/cocoa/NetworkConnectionIntegritySoftLink.h: Added.
* Source/WebCore/PAL/pal/cocoa/NetworkConnectionIntegritySoftLink.mm: Added.
* Source/WebCore/PAL/pal/spi/cocoa/NetworkConnectionIntegritySPI.h: Added.
Add PAL softlinking and SPI headers for frameworks that are required for the "network connection
integrity" feature.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::requestLookalikeCharacterStrings):
Add an IPC method to asynchronously fetch a set of lookalike character strings.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/NetworkProcess/cocoa/NetworkConnectionIntegrityHelpers.h: Added.
* Source/WebKit/NetworkProcess/cocoa/NetworkConnectionIntegrityHelpers.mm: Added.
Add a helper file that contains the definition of `requestLookalikeCharacterStrings` (and any other
related helpers that are related to network connection integrity, which we'll require in subsequent
patches).
* Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
`updateLookalikeCharacterStringsIfNeeded()` after committing the mainframe load.
(WebKit::WebPage::updateLookalikeCharacterStringsIfNeeded):
Refactor this code such that we request and cache lookalike string data in the networking process,
and then propagate these strings down into the web process.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
Canonical link: https://commits.webkit.org/257879@main
More information about the webkit-changes
mailing list