Bug 1761981

pull/28/head
Moonchild 4 months ago committed by roytam1
parent 50965fb223
commit 28821219dd
  1. 5
      dom/jsurl/nsJSProtocolHandler.cpp

@ -202,7 +202,12 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
// Sandboxed document check: javascript: URI's are disabled
// in a sandboxed document unless 'allow-scripts' was specified.
nsIDocument* doc = aOriginalInnerWindow->GetExtantDoc();
if (doc && !doc->IsScriptEnabled()) {
// Scripts not allowed on the extant doc.
return NS_ERROR_DOM_RETVAL_UNDEFINED;
}
if (doc && doc->HasScriptsBlockedBySandbox()) {
// Sandbox policy forbids scripting.
return NS_ERROR_DOM_RETVAL_UNDEFINED;
}

Loading…
Cancel
Save