Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90db59bf540852d8234db7a7241ead6e1a2051d1
      
https://github.com/WebKit/WebKit/commit/90db59bf540852d8234db7a7241ead6e1a2051d1
  Author: Aditya Keerthi <akeer...@apple.com>
  Date:   2023-02-22 (Wed, 22 Feb 2023)

  Changed paths:
    M Source/WebCore/platform/Pasteboard.h
    M Source/WebCore/platform/ios/PasteboardIOS.mm
    M Source/WebCore/platform/ios/PlatformPasteboardIOS.mm

  Log Message:
  -----------
  [iOS] Reading the UIImage type from the system pasteboard can return invalid 
data
https://bugs.webkit.org/show_bug.cgi?id=252697
rdar://105749644

Reviewed by Wenson Hsieh.

Disallow reading the UIImage type from the system pasteboard to avoid returning
invalid data.

* Source/WebCore/platform/Pasteboard.h:
* Source/WebCore/platform/ios/PasteboardIOS.mm:
* Source/WebCore/platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::bufferForType const):

`-[UIPasteboard dataForPasteboardType:]` is equivalent to
`-[UIPasteboard dataForPasteboardType:inItemSet:]` with
`[NSIndexSet indexSetWithIndex:0]`.

Funnel into `PlatformPasteboard::readBuffer` to avoid checking the disallowed
list in two places.

(WebCore::isDisallowedTypeForReadBuffer):
(WebCore::PlatformPasteboard::readBuffer const):

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to