From 99b102e75edbf9ef38bdd3313c0ad788e8a6c7e8 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 23 Sep 2020 14:29:22 +0530 Subject: [PATCH] use canonical form of user signing keys on user profiles --- www/profile/inner.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/profile/inner.js b/www/profile/inner.js index 12ab5e607..cddae4611 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -6,6 +6,7 @@ define([ '/bower_components/nthen/index.js', '/common/sframe-common.js', '/common/common-util.js', + '/common/common-hash.js', '/common/common-interface.js', '/common/common-ui-elements.js', '/common/common-realtime.js', @@ -33,6 +34,7 @@ define([ nThen, SFCommon, Util, + Hash, UI, UIElements, Realtime, @@ -481,9 +483,7 @@ define([ APP.getEdPublic = function () { var metadataMgr = APP.common.getMetadataMgr(); var privateData = metadataMgr.getPrivateData(); - var name = data.name.toLowerCase().replace(/[^a-zA-Z0-9]+/g, "-"); - var ed = data.edPublic.replace(/\//g, '-'); - var url = privateData.origin + '/user/#/1/' + name + '/' + ed; + var url = Hash.getPublicSigningKeyString(privateData.origin, data.name, data.edPublic); var success = Clipboard.copy(url); if (success) { UI.log(Messages.shareSuccess); } };