Permalink
Browse files

was not properly checking the length of the username on newuser

  • Loading branch information...
1 parent 3e2bd53 commit 99ef6ca48ae2d82f01e1c410f21e37d583260580 @matthewfl matthewfl committed Nov 28, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 Bespin/control.js
  2. +1 −1 front-end.js
View
@@ -320,7 +320,7 @@ exports.loginCommand = function (args,request) {
if($("#moreUser:hidden").show().size()) {
return false;
}
- if($("#userName").val() < 3) {
+ if($("#userName").val().length < 2) {
alert("Username is to short");
return false;
}
View
@@ -196,7 +196,7 @@ server.post('/newUser', function (req, res) {
});
req.on('end', function () {
(function (data) {
- if(!data.userName || data.userName=="null" || data.userName < 3)
+ if(!data.userName || data.userName=="null" || data.userName.length < 2)
res.notFound("User name not valid");
db.has("login_"+data.userName, function (has) {
if(has)

0 comments on commit 99ef6ca

Please sign in to comment.