[webkit-changes] [WebKit/WebKit] 961368: PKPaymentMethod fails strict mode decoding when us...

Abrar Rahman Protyasha noreply at github.com
Tue Jan 16 17:43:22 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 96136876b937be459c13e69c62bbc411457bf739
      https://github.com/WebKit/WebKit/commit/96136876b937be459c13e69c62bbc411457bf739
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  -----------
  PKPaymentMethod fails strict mode decoding when using private label cards
https://bugs.webkit.org/show_bug.cgi?id=267480
rdar://120005200

Reviewed by Alex Christensen.

When using private label cards, the PKPaymentMethod object contains
non-null PKPaymentPass data, which leads to an NSKU decode failure when
sending the WebPaymentCoordinator::DidSelectPaymentMethod IPC message
because PKPaymentPass is not strict decodable.

This patch lets us fall back to secure coding for the PKPaymentMethod
type on configurations where the PKPaymentPass type is not strict
decodable, such as on macOS downlevels, which are not privy to upstream
PassKit changes that address the underlying issue.

* Source/WTF/wtf/PlatformHave.h:
Add a new compile-time PlatformHave flag that lets us opt out of
strictly decoding PKPaymentMethod, instead falling back to secure
decoding, for platform configurations that cannot perform strict
decoding of the PKPaymentPass type.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::shouldEnableStrictMode):

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




More information about the webkit-changes mailing list