LibWeb/HTML: Do not disable scripting for script based about: pages
This commit is contained in:
parent
c505240401
commit
8eec7d4585
1 changed files with 5 additions and 1 deletions
|
|
@ -298,7 +298,11 @@ bool is_scripting_enabled(JS::Realm const& realm)
|
|||
|
||||
// The user has not disabled scripting for realm at this time. (User agents may provide users with the option to disable scripting globally, or in a finer-grained manner, e.g., on a per-origin basis, down to the level of individual realms.)
|
||||
auto const& document = as<HTML::Window>(realm.global_object()).associated_document();
|
||||
if (!document.page().is_scripting_enabled())
|
||||
|
||||
// NB: about:settings and about:processes are internal pages using javascript, so we do not consider user configuration for these pages.
|
||||
if (document.url() != URL::about_settings()
|
||||
&& document.url() != URL::about_processes()
|
||||
&& !document.page().is_scripting_enabled())
|
||||
return false;
|
||||
|
||||
// Either settings's global object is not a Window object, or settings's global object's associated Document's active sandboxing flag set does not have its sandboxed scripts browsing context flag set.
|
||||
|
|
|
|||
Loading…
Reference in a new issue