Skip to content

Commit 7443f62

Browse files
committed
Merge branch 'extsdk'
2 parents 8e52744 + 3eb1b91 commit 7443f62

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sdk/windows.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,17 @@ exports.registerOverlay = function registerOverlay(src, location, callback) {
205205
}
206206
_r.overrideMimeType("application/xml");
207207
_r.open("GET", BASE_PATH + src);
208+
// Elevate the request, so DTDs will work. Not a security issue since we
209+
// always load from BASE_PATH, and that is our privileged chrome package.
210+
// This is no different than regular overlays.
211+
let sec = Cc['@mozilla.org/scriptsecuritymanager;1'].
212+
getService(Ci.nsIScriptSecurityManager);
213+
try {
214+
_r.channel.owner = sec.getSystemPrincipal();
215+
}
216+
catch (ex) {
217+
log(LOG_ERROR, "Failed to set system principal");
218+
}
208219
_r.send();
209220
};
210221

0 commit comments

Comments
 (0)