fixed that security problem

This commit is contained in:
Victoria Shevchenko 2025-09-22 13:28:45 +03:00
parent 18579b0af2
commit 0aadaff89d

View file

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