prevent leaking usernames, resolves #3
This commit is contained in:
parent
b42ef06d91
commit
6b0ed684df
9
auth.py
9
auth.py
|
@ -38,11 +38,8 @@ if __name__ == "__main__":
|
||||||
write_pwdb(pwdb, PWDB_PATH)
|
write_pwdb(pwdb, PWDB_PATH)
|
||||||
else:
|
else:
|
||||||
username, password = get_credentials()
|
username, password = get_credentials()
|
||||||
if username not in pwdb:
|
if username not in pwdb or not authenticate(username, password, pwdb):
|
||||||
print('Wrong username!')
|
print('Wrong credentials (username or password)!')
|
||||||
else:
|
else:
|
||||||
if authenticate(username, password, pwdb):
|
print('Successfully authenticated!')
|
||||||
print('Successfully authenticated!')
|
|
||||||
else:
|
|
||||||
print('Wrong password!')
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue