mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
do not check alias_domain_prefix when DISABLE_ALIAS_SUFFIX is set
This commit is contained in:
parent
886d3a761c
commit
03521b5a84
1 changed files with 3 additions and 0 deletions
|
@ -209,7 +209,10 @@ def verify_prefix_suffix(user: User, alias_prefix, alias_suffix) -> bool:
|
||||||
if (
|
if (
|
||||||
alias_domain in user.available_sl_domains()
|
alias_domain in user.available_sl_domains()
|
||||||
and alias_domain not in user_custom_domains
|
and alias_domain not in user_custom_domains
|
||||||
|
# when DISABLE_ALIAS_SUFFIX is true, alias_domain_prefix is empty
|
||||||
|
and not DISABLE_ALIAS_SUFFIX
|
||||||
):
|
):
|
||||||
|
|
||||||
if not alias_domain_prefix.startswith("."):
|
if not alias_domain_prefix.startswith("."):
|
||||||
LOG.exception("User %s submits a wrong alias suffix %s", user, alias_suffix)
|
LOG.exception("User %s submits a wrong alias suffix %s", user, alias_suffix)
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue