display "@" before account name in failed login attempt

master
Aevann1 2022-10-28 22:25:35 +02:00
parent 067a83b1b1
commit 58912b124a
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ def login_post():
def log_failed_admin_login_attempt(account:User, type:str): def log_failed_admin_login_attempt(account:User, type:str):
if not account or account.admin_level < PERMS['SITE_WARN_ON_INVALID_AUTH']: return if not account or account.admin_level < PERMS['SITE_WARN_ON_INVALID_AUTH']: return
ip = get_CF() ip = get_CF()
print(f"Admin user from {ip} failed to login to account {account.user_name} (invalid {type})!") print(f"Admin user from {ip} failed to login to account @{account.user_name} (invalid {type})!")
try: try:
with open(f"/admin_failed_logins", "a+", encoding="utf-8") as f: with open(f"/admin_failed_logins", "a+", encoding="utf-8") as f:
t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time()))) t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time())))