From 8eec7d4585cce04d2bd5af8ba3ef56e571a6ca76 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sat, 17 Jan 2026 12:09:10 +0100 Subject: [PATCH] LibWeb/HTML: Do not disable scripting for script based about: pages --- Libraries/LibWeb/HTML/Scripting/Environments.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/Scripting/Environments.cpp b/Libraries/LibWeb/HTML/Scripting/Environments.cpp index 7fdbebf2fa..48828d00a7 100644 --- a/Libraries/LibWeb/HTML/Scripting/Environments.cpp +++ b/Libraries/LibWeb/HTML/Scripting/Environments.cpp @@ -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(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.