Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f3ac44b62cc1129afd7f156269c0575ad537b252
      
https://github.com/WebKit/WebKit/commit/f3ac44b62cc1129afd7f156269c0575ad537b252
  Author: Abrar Rahman Protyasha <a_protya...@apple.com>
  Date:   2024-03-29 (Fri, 29 Mar 2024)

  Changed paths:
    M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h
    M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm
    M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  -----------
  PKPaymentMethod still fails strict mode decoding when using private label 
cards after 273108@main
https://bugs.webkit.org/show_bug.cgi?id=271845
rdar://124015611

Reviewed by Alex Christensen.

In 273108@main, we addressed the strict mode decode failure for
PKPaymentMethod by falling back to secure mode decoding for downlevels,
and for relying on upstream PassKit changes which explicitly allow
decoding PKSecureElementPass.

Unfortunately, that was not the entire story. In 274384@main, we opted
to start decoding PKSecureElementPass objects directly, which lead to
a new category of decoding failures because PassKit vends a pass object
of parent type PKPaymentPass, which makes the decoder unhappy.

This patch addresses that decode failure by making an exception for
PKSecureElementPass objects, by making PKPaymentPass an additional
allowed class.

Furthermore, since we are decoding PKSecureElementPass directly, we
rewrite arrays in the pass to NSMutableArray instances and make sure to
not convert NSURL instances in the pass to WKSecureCodingURLWrapper.

* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::encodeObjectDirectly<NSObject<NSSecureCoding>>):
(IPC::decodeObjectDirectlyRequiringAllowedClasses<NSObject<NSSecureCoding>>):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to