Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: de7073050171536e61b36d846c55b7366970f508
      
https://github.com/WebKit/WebKit/commit/de7073050171536e61b36d846c55b7366970f508
  Author: Chris Dumez <[email protected]>
  Date:   2023-11-08 (Wed, 08 Nov 2023)

  Changed paths:
    M Source/WebCore/page/csp/ContentSecurityPolicy.cpp

  Log Message:
  -----------
  Crash under ContentSecurityPolicy::reportViolation()
https://bugs.webkit.org/show_bug.cgi?id=264372
rdar://117727308

Reviewed by David Kilzer.

The code was doing an early return in this case:
```
if (!usesReportTo && !is<Document>(m_scriptExecutionContext))
    return;
```
Then proceeding to downcast m_scriptExecutionContext to a Document.
This meant we would do a bad cast in the case where usesReportTo is
true.

* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to