Only compare lowercase representations of usernames

Closes #6
This commit is contained in:
Christine Dodrill 2015-08-04 17:15:55 -07:00
parent fe9752516e
commit 9dbe50322d
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ function auth(data) {
if (data.token == client.token) {
success = true;
}
} else if (client.config.user == data.user) {
} else if (client.config.user.toLowerCase() == data.user.toLowerCase()) {
if (bcrypt.compareSync(data.password || "", client.config.password)) {
success = true;
}