Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

in examples/chat, don't allow null nicknames #865

Closed
wants to merge 1 commit into from

1 participant

@eddyystop

I confirmed that blank nicknames are allowed. JSON.stringify(nicknames) gives {'':''}

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 1, 2012
  1. in examples/chat, don't allow null nicknames

    John SzwaroneK authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  examples/chat/app.js
  2. +1 −1  examples/chat/index.jade
View
2  examples/chat/app.js
@@ -60,7 +60,7 @@ io.sockets.on('connection', function (socket) {
});
socket.on('nickname', function (nick, fn) {
- if (nicknames[nick]) {
+ if (!nick.length || nicknames[nick]) {
fn(true);
} else {
fn(false);
View
2  examples/chat/index.jade
@@ -72,7 +72,7 @@ html
form.wrap#set-nickname
p Please type in your nickname and press enter.
input#nick
- p#nickname-err Nickname already in use
+ p#nickname-err Nickname already in use or not entered
#connecting
.wrap Connecting to socket.io server
#messages
Something went wrong with that request. Please try again.