Fix a bug with guestname capitalization

This commit is contained in:
calzoneman 2013-10-05 20:42:15 -05:00
parent 6309e42989
commit ce197d3d8a
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Sat Oct 05 20:41 2013 CDT
* lib/user.js: Fix a bug where duplicate guestnames were allowed with
different capitalizations
Thu Oct 03 22:09 2013 CDT
* www/assets/js/ui.js: Use sortable("cancel") to remove the need for
the `moveby` field of the movement packet

View File

@ -622,8 +622,9 @@ User.prototype.guestLogin = function (name) {
}
if (self.inChannel()) {
var lname = name.toLowerCase();
for(var i = 0; i < self.channel.users.length; i++) {
if (self.channel.users[i].name == name) {
if (self.channel.users[i].name.toLowerCase() === lname) {
self.socket.emit("login", {
success: false,
error: "That name is already in use on this channel"