1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Fix UAF in CSSStyleSheet

CSSNamespaceRule returns a copy of a DeprecatedString, meaning that the
view returned by the namespace in CSSStyleSheet is into a temporary
string.
This commit is contained in:
Shannon Booth 2023-11-24 19:14:24 +13:00 committed by Andreas Kling
parent 673329e1bd
commit b7bcdf7c53
2 changed files with 6 additions and 6 deletions

View file

@ -50,8 +50,8 @@ public:
void set_style_sheet_list(Badge<StyleSheetList>, StyleSheetList*);
Optional<StringView> default_namespace() const;
Optional<StringView> namespace_uri(StringView namespace_prefix) const;
Optional<FlyString> default_namespace() const;
Optional<FlyString> namespace_uri(StringView namespace_prefix) const;
private:
CSSStyleSheet(JS::Realm&, CSSRuleList&, MediaList&, Optional<AK::URL> location);