diff --git a/toolkit/components/extensions/ExtensionStorageSync.jsm b/toolkit/components/extensions/ExtensionStorageSync.jsm index d82d4edb9ee9..ba64ea462ca3 100644 --- a/toolkit/components/extensions/ExtensionStorageSync.jsm +++ b/toolkit/components/extensions/ExtensionStorageSync.jsm @@ -304,9 +304,6 @@ function cleanUpForContext(extension, context) { * @returns {Promise} */ const openCollection = Task.async(function* (extension, context) { - // FIXME: This leaks metadata about what extensions a user has - // installed. We should calculate collection ID using a hash of - // user ID, extension ID, and some secret. let collectionId = extension.id; const {kinto} = yield storageSyncInit; const coll = kinto.collection(collectionId, { @@ -366,8 +363,7 @@ this.ExtensionStorageSync = { log.info("User was not signed into FxA; cannot sync"); throw new Error("Not signed in to FxA"); } - // FIXME: this leaks metadata about what extensions are being used - const collectionId = extension.id; + const collectionId = extensionIdToCollectionId(signedInUser, extension.id); let syncResults; try { syncResults = yield this._syncCollection(collection, { diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js index b0df55f88499..b449848360ad 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js @@ -328,8 +328,6 @@ function assertKeyRingKey(keyRing, extensionId, expectedKey, message) { // Tests using this ID will share keys in local storage, so be careful. const defaultExtensionId = "{13bdde76-4dc7-11e6-9bdc-54ee758d6342}"; -// FIXME: need to access whatever mechanism we use in the syncing code -const defaultCollectionId = defaultExtensionId; const defaultExtension = {id: defaultExtensionId}; const BORING_KB = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"; @@ -343,6 +341,7 @@ const loggedInUser = { }, }, }; +const defaultCollectionId = extensionIdToCollectionId(loggedInUser, defaultExtensionId); function uuid() { const uuidgen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);