commit 23bbb5a1e52c8c1e1b448839ee61ad8b29ae22af
parent 87efe75e24ff639db15574b1ffa0eb2e62efb91f
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 5 Mar 2018 17:37:24 -0500
Make atob() available in translator sandbox
Addresses zotero/translators#1576
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js
@@ -368,7 +368,16 @@ Zotero.Translate.DOMWrapper = new function() {
*/
Zotero.Translate.SandboxManager = function(sandboxLocation) {
// sandboxLocation = Components.classes["@mozilla.org/systemprincipal;1"].createInstance(Components.interfaces.nsIPrincipal);
- var sandbox = this.sandbox = new Components.utils.Sandbox(sandboxLocation, {wantComponents:false, wantGlobalProperties:["XMLHttpRequest"]});
+ var sandbox = this.sandbox = new Components.utils.Sandbox(
+ sandboxLocation,
+ {
+ wantComponents: false,
+ wantGlobalProperties: [
+ 'atob',
+ 'XMLHttpRequest'
+ ]
+ }
+ );
this.sandbox.Zotero = {};
// import functions missing from global scope into Fx sandbox