Skip to content

Commit

Permalink
lowercase the username input for emailaddy
Browse files Browse the repository at this point in the history
lowercase the username input so the email address is valid for dovecot mail delivery. Fix confirmed bug referenced:
https://forums.cyberpanel.net/discussion/2345/creating-new-email-account-fail#latest
  • Loading branch information
meramsey committed Oct 25, 2019
1 parent 7f37916 commit efcdbef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mailServer/mailserverManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def submitEmailCreation(self):

data = json.loads(self.request.body)
domainName = data['domain']
userName = data['username']
userName = data['username'].lower()
password = data['passwordByPass']


Expand All @@ -102,7 +102,7 @@ def submitEmailCreation(self):

## Create email entry

result = mailUtilities.createEmailAccount(domainName, userName, password)
result = mailUtilities.createEmailAccount(domainName, userName.lower(), password)

if result[0] == 1:
data_ret = {'status': 1, 'createEmailStatus': 1, 'error_message': "None"}
Expand Down Expand Up @@ -679,4 +679,4 @@ def installStatusOpenDKIM(self):
except BaseException, msg:
final_dic = {'abort': 1, 'installed': 0, 'error_message': str(msg)}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
return HttpResponse(final_json)

0 comments on commit efcdbef

Please sign in to comment.