Trimmed username spaces (#9793)

This commit is contained in:
Keith Holliday
2018-01-15 10:20:36 -07:00
committed by GitHub
parent 286566fc0c
commit 0ea91016f8
2 changed files with 17 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ api.registerLocal = {
// Get the lowercase version of username to check that we do not have duplicates
// So we can search for it in the database and then reject the choosen username if 1 or more results are found
email = email.toLowerCase();
username = username.trim();
let lowerCaseUsername = username.toLowerCase();
// Search for duplicates using lowercase version of username