Bug 1253740 - Hash extension ID to obfuscate installed add-ons, r=bsilverberg,kmag

MozReview-Commit-ID: ASBrDxIq2lF

--HG--
extra : rebase_source : e5d6b8d7e0d1f31f11b7f8bdefb20da6b7d4212d
extra : intermediate-source : 2273d3092f922a1b9519f00c52fb5c6d9c436f66
extra : source : e5e4c725b8d7c29d0f7113690244e847dcfa7b81
This commit is contained in:
Ethan Glasser-Camp 2016-07-28 12:20:42 -04:00
parent 91ac1cbb42
commit 50314ee3a6
2 changed files with 2 additions and 7 deletions

View File

@ -304,9 +304,6 @@ function cleanUpForContext(extension, context) {
* @returns {Promise<Collection>}
*/
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, {

View File

@ -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);