Fix a few minor error conditions

This commit is contained in:
Calvin Montgomery 2018-09-30 21:22:20 -07:00
parent ce44bfea9e
commit 1923af16a9
4 changed files with 9 additions and 4 deletions

View file

@ -228,6 +228,11 @@ module.exports = {
return;
}
if (!$util.isValidUserName(name)) {
callback(`Invalid username "${name}"`);
return;
}
/* Passwords are capped at 100 characters to prevent a potential
denial of service vector through causing the server to hash
ridiculously long strings.