keep password secure when adding new user
This commit is contained in:
parent
b42ef06d91
commit
b9481a719e
2
auth.py
2
auth.py
|
@ -13,7 +13,7 @@ def authenticate(username, password, pwdb):
|
||||||
return password == pwdb[username]
|
return password == pwdb[username]
|
||||||
|
|
||||||
def add_user(username, pwdb):
|
def add_user(username, pwdb):
|
||||||
pwdb[username] = input(f'Enter password for {username}: ')
|
pwdb[username] = getpass(f'Enter password for {username}: ')
|
||||||
return pwdb
|
return pwdb
|
||||||
|
|
||||||
def read_pwdb(PWDB_PATH):
|
def read_pwdb(PWDB_PATH):
|
||||||
|
|
Loading…
Reference in a new issue