mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Check if scripting is disabled before running script
This is not a full check, it's just enough to prevent script execution in DOMParser.
This commit is contained in:
parent
ce314c54bd
commit
0ea50d44bf
Notes:
sideshowbarker
2024-07-18 10:24:40 +09:00
Author: https://github.com/Lubrsi
Commit: 0ea50d44bf
Pull-request: https://github.com/SerenityOS/serenity/pull/8449
3 changed files with 13 additions and 1 deletions
|
@ -153,7 +153,10 @@ void HTMLScriptElement::prepare_script()
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: Check if scripting is disabled, if so return
|
||||
if (is_scripting_disabled()) {
|
||||
dbgln("HTMLScriptElement: Refusing to run script because scripting is disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_script_type == ScriptType::Classic && has_attribute(HTML::AttributeNames::nomodule)) {
|
||||
dbgln("HTMLScriptElement: Refusing to run classic script because it has the nomodule attribute.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue