mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +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
@@ -167,7 +167,7 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(String c
|
||||
return WebIDL::InvalidCharacterError::create(realm(), "Name is not a valid attribute local name."_utf16);
|
||||
|
||||
// 5. Set an attribute value for the DOMStringMap's associated element using name and value.
|
||||
TRY(m_associated_element->set_attribute(data_name, value));
|
||||
m_associated_element->set_attribute_value(data_name, value);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user