Title: [286324] trunk/Source/WebCore
- Revision
- 286324
- Author
- [email protected]
- Date
- 2021-11-30 13:40:27 -0800 (Tue, 30 Nov 2021)
Log Message
[Hardening] Early return in JSLazyEventListener::initializeJSFunction() if !settings().scriptMarkupEnabled()
https://bugs.webkit.org/show_bug.cgi?id=233646
Reviewed by Geoff Garen.
Early return in JSLazyEventListener::initializeJSFunction() if !settings().scriptMarkupEnabled() as a
hardening measure.
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (286323 => 286324)
--- trunk/Source/WebCore/ChangeLog 2021-11-30 21:35:25 UTC (rev 286323)
+++ trunk/Source/WebCore/ChangeLog 2021-11-30 21:40:27 UTC (rev 286324)
@@ -1,5 +1,18 @@
2021-11-30 Chris Dumez <[email protected]>
+ [Hardening] Early return in JSLazyEventListener::initializeJSFunction() if !settings().scriptMarkupEnabled()
+ https://bugs.webkit.org/show_bug.cgi?id=233646
+
+ Reviewed by Geoff Garen.
+
+ Early return in JSLazyEventListener::initializeJSFunction() if !settings().scriptMarkupEnabled() as a
+ hardening measure.
+
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::initializeJSFunction const):
+
+2021-11-30 Chris Dumez <[email protected]>
+
html/semantics/forms/constraints/form-validation-validity-customError.html WPT test is failing
https://bugs.webkit.org/show_bug.cgi?id=233599
Modified: trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp (286323 => 286324)
--- trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp 2021-11-30 21:35:25 UTC (rev 286323)
+++ trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp 2021-11-30 21:40:27 UTC (rev 286324)
@@ -139,6 +139,10 @@
if (!script.canExecuteScripts(AboutToCreateEventListener) || script.isPaused())
return nullptr;
+ ASSERT_WITH_MESSAGE(document.settings().scriptMarkupEnabled(), "Scripting element attributes should have been stripped during parsing");
+ if (UNLIKELY(!document.settings().scriptMarkupEnabled()))
+ return nullptr;
+
if (!executionContextDocument.frame())
return nullptr;
auto* globalObject = toJSDOMWindow(*executionContextDocument.frame(), isolatedWorld());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes