mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 08:33:28 +02:00
LibWeb: Avoid invoking Trusted Types where avoidable
Prevents observably calling Trusted Types, which can run arbitrary JS, cause crashes due to use of MUST and allow arbitrary JS to modify internal elements.
This commit is contained in:
Notes:
github-actions[bot]
2025-11-06 16:46:00 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/82bd3d38911 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6632 Reviewed-by: https://github.com/AtkinsSJ
@@ -787,7 +787,7 @@ void HTMLScriptElement::set_async(bool async)
|
||||
|
||||
// 2. If the given value is true, then set this's async content attribute to the empty string.
|
||||
if (async) {
|
||||
MUST(set_attribute(HTML::AttributeNames::async, ""_string));
|
||||
set_attribute_value(HTML::AttributeNames::async, ""_string);
|
||||
}
|
||||
// 3. Otherwise, remove this's async content attribute.
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user