From 32a7c6258070da039879fe34c2aad51faeb1a1bd Mon Sep 17 00:00:00 2001 From: Mano Date: Wed, 22 Dec 2010 06:10:00 -0500 Subject: [PATCH] Bug 620666 - urlSecurityCheck should include the principal uri in its exception; r=dao --- toolkit/content/contentAreaUtils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 99168e8b431..a6bdcdf400f 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -88,8 +88,13 @@ function urlSecurityCheck(aURL, aPrincipal, aFlags) else secMan.checkLoadURIStrWithPrincipal(aPrincipal, aURL, aFlags); } catch (e) { - // XXXmano: dump the principal url here too - throw "Load of " + aURL + " denied."; + let principalStr = ""; + try { + principalStr = " from " + aPrincipal.URI.spec; + } + catch(e2) { } + + throw "Load of " + aURL + principalStr + " denied."; } }