Correction d'un bug

This commit is contained in:
kitoy 2022-09-01 10:32:31 +02:00
parent 1ac275c415
commit 4e525f5d79
1 changed files with 5 additions and 4 deletions

View File

@ -34,9 +34,13 @@ def email_disp(email):
# Caractères non autorisés dans la RFC #822
invalid_char = { '(', ')', '<', '>', ',', ';', ':', '"', '[', ']', '|', 'ç', '%', '&' }
for character in invalid_char:
if character in email:
disp=False
cursor.execute("""SELECT mail FROM users WHERE mail=?""", (email,))
testmail = cursor.fetchall()
if testmail :
if testmail and disp:
disp = False
if disp:
@ -48,9 +52,6 @@ def email_disp(email):
if email in alias:
disp=False
for character in invalid_char:
if(email.find(character)>0):
disp=False
else: