mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
handle the case where no hostname is provided in /api/alias/new
This commit is contained in:
parent
9296fd42c4
commit
79a7985221
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ def index():
|
||||||
if user.is_premium():
|
if user.is_premium():
|
||||||
LOG.d("create new custom alias %s %s", hostname, user)
|
LOG.d("create new custom alias %s %s", hostname, user)
|
||||||
|
|
||||||
|
# avoid too short custom email prefix
|
||||||
|
if len(hostname) < 3:
|
||||||
|
LOG.d("hostname %s too short", hostname)
|
||||||
|
hostname = "default"
|
||||||
|
|
||||||
# generate a custom email
|
# generate a custom email
|
||||||
found = False
|
found = False
|
||||||
while not found:
|
while not found:
|
||||||
|
|
Loading…
Reference in a new issue