forked from MarseyWorld/MarseyWorld
display "@" before account name in failed login attempt
parent
067a83b1b1
commit
58912b124a
|
@ -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())))
|
||||||
|
|
Loading…
Reference in New Issue