do not add app mailboxes to database

a) we don't allow .app pattern in database for aliases and mailboxes
b) the addons already know about app names separately
This commit is contained in:
Girish Ramakrishnan
2016-05-30 01:32:18 -07:00
parent 9e36b7abf4
commit 75c1731443
4 changed files with 26 additions and 38 deletions

View File

@@ -95,6 +95,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');
// app emails are sent using the .app suffix
if (username.indexOf('.app') !== -1) return new UserError(UserError.BAD_USERNAME, 'Username pattern is reserved for apps');
return null;