do not leak valid usernames

This commit is contained in:
Tiziano Zito 2025-09-22 13:25:55 +03:00
parent becc5fd8aa
commit 18579b0af2

View file

@ -34,9 +34,9 @@ if len(sys.argv) > 1:
else: else:
username, password = get_credentials() username, password = get_credentials()
if username not in pwdb: if username not in pwdb:
print('Wrong username!') print('Wrong username or password!')
else: else:
if authenticate(username, password, pwdb): if authenticate(username, password, pwdb):
print('Successfully authenticated!') print('Successfully authenticated!')
else: else:
print('Wrong password!') print('Wrong username or password!')