Skip to content
Snippets Groups Projects
Commit 5191f33e authored by Martin Mareš's avatar Martin Mareš
Browse files

K @nomail generujeme náhodný prefix pouze tehdy, když přes @ nic není

Jinak editování uživatele způsobí přegenerování prefixu :)
parent d64b1cb2
No related branches found
No related tags found
No related merge requests found
...@@ -294,7 +294,7 @@ def email_check_domain(domain: str): ...@@ -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: 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' addr = base64.b32encode(secrets.token_bytes(10)).decode('US-ASCII').lower() + '@nomail'
if '@' not in addr: if '@' not in addr:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment