From 91ba41b8e8a7f75eee8dc42773e65ebe1c673ebc Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 23 May 2017 11:46:59 +0200 Subject: [PATCH 1/2] hotfix for account ids --- rpc.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpc.js b/rpc.js index 489f8b725..0257c498f 100644 --- a/rpc.js +++ b/rpc.js @@ -376,6 +376,11 @@ var updateLimits = function (config, publicKey, cb) { var defaultLimit = typeof(config.defaultStorageLimit) === 'number'? config.defaultStorageLimit: DEFAULT_LIMIT; + var userId; + if (publicKey) { + userId = unescapeKeyCharacters(publicKey); + } + var body = JSON.stringify({ domain: config.domain, subdomain: config.subdomain @@ -404,8 +409,8 @@ var updateLimits = function (config, publicKey, cb) { var json = JSON.parse(str); limits = json; var l; - if (publicKey) { - var limit = limits[publicKey]; + if (userId) { + var limit = limits[userId]; l = limit && typeof limit.limit === "number" ? [limit.limit, limit.plan, limit.note] : [defaultLimit, '', '']; } From 0a646a9534538ec874b69784cfcb8404fee67d88 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 23 May 2017 12:35:49 +0200 Subject: [PATCH 2/2] remove unnecessary space --- customize.dist/translations/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 186bb3684..751cf3633 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -481,7 +481,7 @@ define(function () { '# CryptPad\'s Zero Knowledge collaborative code editor\n', '\n', '* What you type here is encrypted so only people who have the link can access it.\n', - '* You can choose the programming language to highlight and the UI color scheme in the upper right.' + '* You can choose the programming language to highlight and the UI color scheme in the upper right.' ].join(''); out.slideInitialState = [