From ce197d3d8a84ad5a39490f5630cc8b41bf9d0e6c Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 5 Oct 2013 20:42:15 -0500 Subject: [PATCH] Fix a bug with guestname capitalization --- changelog | 4 ++++ lib/user.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 829e6fa7..619997e8 100644 --- a/changelog +++ b/changelog @@ -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 diff --git a/lib/user.js b/lib/user.js index 45030d5b..441304b3 100644 --- a/lib/user.js +++ b/lib/user.js @@ -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"