Skip to content

Commit e1d016d

Browse files
committed
use getpass.getpass instead of input to ask for password in a secure way
1 parent 251dde5 commit e1d016d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dsutil/hadoop/kerberos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def read_passwd() -> str:
4848
os.chmod(PROFILE, 0o600)
4949
with open(PROFILE, "r", encoding="utf-8") as fin:
5050
return base64.b64decode(fin.read()).decode()
51-
passwd = input("Please enter password for kinit: ")
51+
passwd = getpass.getpass("Please enter password for kinit: ")
5252
save_passwd(passwd)
5353
return passwd
5454

0 commit comments

Comments
 (0)