mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Needed for 7254: Implement DOM security
reviewed by Ben Goodger <rgoodger@ihug.co.nz> and Seth Spitzer <sspitzer@netscape.com> Scripts running from chrome are considered super privileged and can perform operations that scripts from the web cannot. I differentiate chrome scripts from web scripts by considering all scripts loaded from chrome: URIs to be privileged. The problem I'm running into is that the loading of relative urls in this code ends up going to the file: protocol (which is what the chrome protocol is converted to internally). This change makes sure we load from the chrome protocol so that the scripts are privileged and don't get access errors. It's probably a good idea to load from the chrome protocol anyway since it may one day be resolved to extracting from a JAR file rather than accessing a discrete file.
This commit is contained in:
parent
f4add754d8
commit
e8f0b53250
@ -67,7 +67,7 @@ var testMap = {
|
||||
newProfile1_1: { previous: null, next: "newProfile1_2" },
|
||||
newProfile1_2: { previous: "newProfile1_1", next: null},
|
||||
}
|
||||
|
||||
var pagePrefix = "chrome://profile/content/";
|
||||
var pagePostfix=".xul";
|
||||
var currentPageTag;
|
||||
|
||||
@ -200,7 +200,7 @@ function onCancel()
|
||||
// utility functions
|
||||
function getUrlFromTag(title)
|
||||
{
|
||||
return title + pagePostfix;
|
||||
return pagePrefix + title + pagePostfix;
|
||||
}
|
||||
|
||||
function Startup()
|
||||
|
Loading…
x
Reference in New Issue
Block a user