Merge pull request 'hide user password on user creation' (#18) from giovannife/2024-heraklion-git:secure-add-user into main

Reviewed-on: #18

Thanks!
This commit is contained in:
Tiziano Zito 2024-08-26 14:47:36 +02:00
commit 0113bf68b9

View file

@ -14,7 +14,7 @@ def authenticate(username, hashed_password, pwdb):
return hashed_password == pwdb[username]
def add_user(username, pwdb):
pwdb[username] = pwhash(input(f'Enter password for {username}: '))
pwdb[username] = pwhash(getpass(f'Enter password for {username}: '))
return pwdb
def read_pwdb(PWDB_PATH):