fix: Update domain verification
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 18s
Build Docker / Build Main Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2023-11-17 13:12:33 +11:00
parent 8c895eddea
commit 7e5235efb8
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -9,6 +9,7 @@ from email_validator import validate_email, EmailNotValidError
import accounts
import db
import varo
import re
app = Flask(__name__)
dotenv.load_dotenv()
@ -66,7 +67,9 @@ def signup():
password = request.form['password']
# Verify domain
if domain.startswith('_'):
if domain.startswith('_') or domain.endswith('_'):
return error('Invalid domain')
if not re.match("^[a-z0-9]*$", domain):
return error('Invalid domain')
try: