Lookups are URL safe

This commit is contained in:
Travis Ralston
2019-08-21 14:30:24 -06:00
parent 3d5a79be3b
commit b306df726a
+2 -1
View File
@@ -1908,7 +1908,8 @@ MatrixBaseApis.prototype.identityHashedLookup = async function(
// Abuse the olm hashing
const olmutil = new global.Olm.Utility();
params["addresses"] = addressPairs.map(p => {
const hashed = olmutil.sha256(`${p[0]} ${p[1]} ${params['pepper']}`);
const hashed = olmutil.sha256(`${p[0]} ${p[1]} ${params['pepper']}`)
.replace(/\+/g, '-').replace(/\//g, '_'); // URL-safe base64
localMapping[hashed] = p[0];
return hashed;
});