asweigart / asweigart/pyinputplus
Empty mask in inputPassword
- Dominant language
- Python
- Stars
- 114
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi Al,
When using an empty string (mask='') as a mask, stdiomask falls back on python's getpass resulting in printing the prompt after entering the password (on return), this is due to setting end='' in print.
To fix it, the orginal code (line 157..161) should be updated as follows:
```
# Get the user input.
if passwordMask is None:
userInput = input(prompt)
else:
userInput = stdiomask.getpass(prompt=prompt, mask=passwordMask)
```
regards

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.