mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
greeterbot: better comparison method
Co-authored-by: holger krekel <holger@merlinux.eu>
This commit is contained in:
@@ -46,7 +46,7 @@ def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
|||||||
len(localpart) > config.username_max_length
|
len(localpart) > config.username_max_length
|
||||||
or len(localpart) < config.username_min_length
|
or len(localpart) < config.username_min_length
|
||||||
):
|
):
|
||||||
if localpart != "echo" and localpart != "hello":
|
if localpart not in ("echo", "hello"):
|
||||||
logging.warning(
|
logging.warning(
|
||||||
"localpart %s has to be between %s and %s chars long",
|
"localpart %s has to be between %s and %s chars long",
|
||||||
localpart,
|
localpart,
|
||||||
|
|||||||
Reference in New Issue
Block a user