'-' has special meaning haraka

so do '.app' instead
This commit is contained in:
Girish Ramakrishnan
2016-05-26 10:57:39 -07:00
parent b3f53099f0
commit badc524ff2
2 changed files with 5 additions and 5 deletions

View File

@@ -91,7 +91,7 @@ function validateUsername(username) {
// +/- can be tricky in emails
if (/[^a-zA-Z0-9.]/.test(username)) return new UserError(UserError.BAD_USERNAME, 'Username can only contain alphanumerals and dot');
if (username.indexOf('-app') !== -1) return new UserError(UserError.BAD_USERNAME, 'Username pattern is reserved for apps');
if (username.indexOf('.app') !== -1) return new UserError(UserError.BAD_USERNAME, 'Username pattern is reserved for apps');
return null;
}