From 353b7404d98466df3c76523788dfbeda85ba7962 Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Tue, 14 Aug 2012 15:37:04 -0400 Subject: [PATCH] Bug 781323: fix about:sync-log, r=gps --HG-- extra : rebase_source : 168339ad89dd0263b83deb7d9b028d59562cffe0 --- services/sync/Weave.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/services/sync/Weave.js b/services/sync/Weave.js index 6d6b0ec0fb87..2af3608db91c 100644 --- a/services/sync/Weave.js +++ b/services/sync/Weave.js @@ -59,10 +59,12 @@ AboutWeaveLog.prototype = { let channel = Services.io.newChannelFromURI(uri); channel.originalURI = aURI; - // Setting the owner to null means that we'll go through the normal - // path in GetChannelPrincipal and create a codebase principal based - // on the channel's originalURI - channel.owner = null; + // Ensure that the about page has the same privileges as a regular directory + // view. That way links to files can be opened. + let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"] + .getService(Ci.nsIScriptSecurityManager); + let principal = ssm.getSimpleCodebasePrincipal(uri); + channel.owner = principal; return channel; } };