keep password secure when adding new user #12

Open
giovannife wants to merge 1 commit from giovannife/2024-heraklion-git:save-pwd-secure into main

View file

@ -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):