mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-14 02:34:22 +02:00
Fixed admin_1 errors in the logs
Fixed errors when trying to log in with an account without domain. This closes #585
This commit is contained in:
parent
09abaff9b6
commit
6dcc33e390
@ -35,11 +35,14 @@ class IdnaEmail(db.TypeDecorator):
|
||||
impl = db.String(255, collation="NOCASE")
|
||||
|
||||
def process_bind_param(self, value, dialect):
|
||||
localpart, domain_name = value.split('@')
|
||||
return "{0}@{1}".format(
|
||||
localpart,
|
||||
idna.encode(domain_name).decode('ascii'),
|
||||
)
|
||||
try:
|
||||
localpart, domain_name = value.split('@')
|
||||
return "{0}@{1}".format(
|
||||
localpart,
|
||||
idna.encode(domain_name).decode('ascii'),
|
||||
)
|
||||
except:
|
||||
pass
|
||||
|
||||
def process_result_value(self, value, dialect):
|
||||
localpart, domain_name = value.split('@')
|
||||
|
Loading…
Reference in New Issue
Block a user