Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

was not properly checking the length of the username on newuser

  • Loading branch information...
commit 99ef6ca48ae2d82f01e1c410f21e37d583260580 1 parent 3e2bd53
@matthewfl matthewfl authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  Bespin/control.js
  2. +1 −1  front-end.js
View
2  Bespin/control.js
@@ -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
2  front-end.js
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.