Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.3k
Open
Description
Bug report
Bug description:
HittingCtrl+U should clear the line but this is badly handled whenecho_char is given:
>>>getpass.getpass()Password:'bar'>>>getpass.getpass(echo_char="*")Password:*******'foo\x15bar'
This issue stems from the fact that we switch to non-canonical mode (https://www.man7.org/linux/man-pages/man3/termios.3.html). The rationale is that in canonical mode, we only have a line-by-line feedback (so we would see the characters only when we hit ENTER, which is not really useful...)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux