potential regex code fix for email validation

This commit is contained in:
Tyler Todd 2023-02-13 15:38:33 +00:00
parent 16d7a4f71e
commit 48f80b37ed

View File

@ -665,7 +665,7 @@ def register():
email = request.form.get('email', '').strip() email = request.form.get('email', '').strip()
rpassword = request.form.get('rpassword', '') rpassword = request.form.get('rpassword', '')
is_valid_email = re.compile(r'[\w\.-]+@[\w\.-]+') is_valid_email = re.compile(r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$')
error_messages = {} error_messages = {}
if not firstname: if not firstname: