From 5191f33e2e5bce6329b444ebfc509f8dccdbb0b4 Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Fri, 29 Sep 2023 18:35:19 +0200 Subject: [PATCH] =?UTF-8?q?K=20@nomail=20generujeme=20n=C3=A1hodn=C3=BD=20?= =?UTF-8?q?prefix=20pouze=20tehdy,=20kdy=C5=BE=20p=C5=99es=20@=20nic=20nen?= =?UTF-8?q?=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jinak editování uživatele způsobí přegenerování prefixu :) --- mo/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mo/users.py b/mo/users.py index bbfedf7f..bc5494b4 100644 --- a/mo/users.py +++ b/mo/users.py @@ -294,7 +294,7 @@ def email_check_domain(domain: str): def normalize_email(addr: str, check_existence: bool = False, make_unique_nomail: bool = False) -> str: - if make_unique_nomail and addr.endswith('@nomail'): + if make_unique_nomail and addr == '@nomail': addr = base64.b32encode(secrets.token_bytes(10)).decode('US-ASCII').lower() + '@nomail' if '@' not in addr: -- GitLab