From d2501e59611d63df9cb64014fe18ceb467957bd0 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 19 Jan 2020 14:09:13 +0100 Subject: [PATCH] make sure to "strip" custom domain before adding to DB --- app/dashboard/views/custom_domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dashboard/views/custom_domain.py b/app/dashboard/views/custom_domain.py index c05cfff0..e9ccd1b3 100644 --- a/app/dashboard/views/custom_domain.py +++ b/app/dashboard/views/custom_domain.py @@ -31,7 +31,7 @@ def custom_domain(): if request.method == "POST": if request.form.get("form-name") == "create": if new_custom_domain_form.validate(): - new_domain = new_custom_domain_form.domain.data + new_domain = new_custom_domain_form.domain.data.strip() if CustomDomain.get_by(domain=new_domain): flash(f"{new_domain} already added", "warning") else: