'-' has special meaning haraka
so do '.app' instead
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user