[webkit-changes] [WebKit/WebKit] 6ba5b5: Prevent SVGUseElement from sniffing content type w...

Zak Ridouh noreply at github.com
Tue Sep 10 17:14:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ba5b52ad5c187aff42495a56b39b7c03482fbc8
      https://github.com/WebKit/WebKit/commit/6ba5b52ad5c187aff42495a56b39b7c03482fbc8
  Author: Zak Ridouh <zakr at apple.com>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/svg/sniffing-content-type-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/svg/sniffing-content-type.html
    M Source/WebCore/svg/SVGUseElement.cpp

  Log Message:
  -----------
  Prevent SVGUseElement from sniffing content type when loading external document
https://bugs.webkit.org/show_bug.cgi?id=249948
rdar://103893082

Reviewed by Tim Nguyen.

This change modifies the content sniffing policy for SVGUseElement to
prevent WebKit from loading external documents with incorrect MIME types.

This is done by setting the `ContentSniffingPolicy` to `DoNotSniffContent`.

Also, add a new test to validate this fix.

* LayoutTests/imported/w3c/web-platform-tests/svg/sniffing-content-type-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/svg/sniffing-content-type.html: Added.
* Source/WebCore/svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateExternalDocument):

Canonical link: https://commits.webkit.org/283447@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