Normalize the emails before register the user identity Lowercase the inputted e-mail bofore using it for identity. This way we remove the possiblity to have multiple identities with same e-mail but different casing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/commit/e849f806 Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/tree/e849f806 Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/diff/e849f806 Branch: refs/heads/master Commit: e849f80670b6a00ec919717a5d6f746b2757c379 Parents: fc678e5 Author: Pavlin Angelov <[email protected]> Authored: Wed May 18 18:00:14 2016 +0300 Committer: Vladislav Mitov <[email protected]> Committed: Thu May 26 14:16:51 2016 +0300 ---------------------------------------------------------------------- browser/js/mpin.js | 6 +++--- mobile/js/main.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/blob/e849f806/browser/js/mpin.js ---------------------------------------------------------------------- diff --git a/browser/js/mpin.js b/browser/js/mpin.js index 52079bc..5b89da0 100644 --- a/browser/js/mpin.js +++ b/browser/js/mpin.js @@ -603,7 +603,7 @@ var mpin = mpin || {}; //set Temporary params if enter email and then press tooltip without submit request... function setTemp () { self.tmp || (self.tmp = {}); - self.tmp.setupEmail = document.getElementById("emailInput").value; + self.tmp.setupEmail = document.getElementById("emailInput").value.toLowerCase(); if (self.opts.setDeviceName) { self.tmp.setupDeviceName = document.getElementById("deviceInput").value; } @@ -671,7 +671,7 @@ var mpin = mpin || {}; //set Temporary params if enter email and then press tooltip without submit request... function setTemp () { self.tmp || (self.tmp = {}); - self.tmp.setup2Email = document.getElementById("emailInput").value; + self.tmp.setup2Email = document.getElementById("emailInput").value.toLowerCase(); if (self.opts.setDeviceName) { self.tmp.setup2DeviceName = document.getElementById("deviceInput").value; } @@ -1712,7 +1712,7 @@ var mpin = mpin || {}; mpin.prototype.actionSetupHome = function (uId) { var self = this, _email, _deviceName, _deviceNameInput, removeError, elems = []; - _email = (uId) ? uId : document.getElementById("emailInput").value; + _email = (uId) ? uId : document.getElementById("emailInput").value.toLowerCase(); _deviceNameInput = (document.getElementById("deviceInput")) ? document.getElementById("deviceInput").value.trim() : ""; if ((_email.length === 0 || !this.opts.identityCheckRegex.test(_email)) && !(this.opts.prerollid)) { http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/blob/e849f806/mobile/js/main.js ---------------------------------------------------------------------- diff --git a/mobile/js/main.js b/mobile/js/main.js index 488ec78..970122c 100644 --- a/mobile/js/main.js +++ b/mobile/js/main.js @@ -1682,7 +1682,7 @@ var mpin = mpin || {}; var _email, _deviceName, _deviceNameInput, _reqData = {}, self = this, elems = [], removeError; - _email = (uId) ? uId : document.getElementById("emailInput").value; + _email = (uId) ? uId : document.getElementById("emailInput").value.toLowerCase(); if (_email.length === 0 || !this.opts.emailCheckRegex.test(_email)) { document.getElementById("emailInput").focus();
