From 343007b3e383e3c43b444a1c09a21dd9ec54aa63 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Wed, 3 May 2006 00:43:11 +0000 Subject: [PATCH] Bug 329468: check url before showing frame, patch by Martijn Wargers , r=dveditz --- browser/base/content/browser.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index b8acd86fa119..07031f55e211 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4559,7 +4559,14 @@ nsContextMenu.prototype = { }, // Open clicked-in frame in the same window. showOnlyThisFrame : function () { - window.loadURI(this.target.ownerDocument.location.href, null, null, false); + try { + const secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"] + .getService(Components.interfaces.nsIScriptSecurityManager); + const nsIScriptSecMan = Components.interfaces.nsIScriptSecurityManager; + secMan.checkLoadURI(gBrowser.currentURI, makeURI(this.target.ownerDocument.location.href), + nsIScriptSecMan.DISALLOW_SCRIPT); + window.loadURI(this.target.ownerDocument.location.href, null, null, false); + } catch(e) {} }, // View Partial Source viewPartialSource : function ( context ) {