From fbcf4ccec4881d44b7cda1bea9e13bcc835840e9 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 13 Feb 2017 11:01:30 +0100 Subject: [PATCH] force usernames to be lowercase --- www/common/login.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/common/login.js b/www/common/login.js index bf3848c70..99678b1dd 100644 --- a/www/common/login.js +++ b/www/common/login.js @@ -70,6 +70,9 @@ define([ Exports.loginOrRegister = function (uname, passwd, isRegister, cb) { if (typeof(cb) !== 'function') { return; } + // Usernames are all lowercase. No going back on this one + uname = uname.toLowerCase(); + // validate inputs if (!Cred.isValidUsername(uname)) { return void cb('INVAL_USER'); } if (!Cred.isValidPassword(passwd)) { return void cb('INVAL_PASS'); }