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

MozReview-Commit-ID: ASBrDxIq2lF

--HG--
extra : rebase_source : c6a21399a0530294844a94286baa38764235d322
extra : intermediate-source : 2273d3092f922a1b9519f00c52fb5c6d9c436f66
extra : source : e5e4c725b8d7c29d0f7113690244e847dcfa7b81
This commit is contained in:
Ethan Glasser-Camp 2016-07-28 12:20:42 -04:00
Родитель 24b0f0306c
Коммит b5f08d031e
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -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, {

Просмотреть файл

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