mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
make sure a custom domain name does not contain a linebreak
This commit is contained in:
parent
78ddf16c87
commit
8aed5ced3f
2 changed files with 5 additions and 1 deletions
|
@ -154,7 +154,7 @@ def domain_detail(custom_domain_id):
|
|||
url_for("dashboard.domain_detail", custom_domain_id=custom_domain.id)
|
||||
)
|
||||
elif request.form.get("form-name") == "set-name":
|
||||
custom_domain.name = request.form.get("alias-name")
|
||||
custom_domain.name = request.form.get("alias-name").replace("\n", "")
|
||||
db.session.commit()
|
||||
flash(
|
||||
f"Default alias name for Domain {custom_domain.domain} has been set",
|
||||
|
|
4
cron.py
4
cron.py
|
@ -395,6 +395,10 @@ def sanity_check():
|
|||
if not contact.reply_email.isascii():
|
||||
LOG.exception("Contact %s reply email is not ascii", contact)
|
||||
|
||||
for domain in CustomDomain.query.all():
|
||||
if domain.name and "\n" in domain.name:
|
||||
LOG.exception("Domain %s name contain linebreak %s", domain, domain.name)
|
||||
|
||||
LOG.d("Finish sanity check")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue