mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-01 21:52:02 +08:00
Fixes an issue with ContextReader on `bash` where abandoned password reads cause the terminal to remain "locked" even after `tsh` exits. This happens on interrupts but also on regular exit if the user picks a security key in the dual security key/OTP login prompt. Doesn't seem to affect shells like `zsh` or `fish`. Repro steps: ```shell $ bash # repro #1 $ ./tsh login --proxy=example.com > Enter password for Teleport user llama: <CTRL-C> # shell is now locked # repro #2 # (Use an account with security key and OTP MFA.) $ ./tsh login --proxy=example.com > Enter password for Teleport user llama: <enters password> > Tap any security key or enter a code from a OTP device <taps security key> # shell is now locked ``` * Restore terminal state on interrupt or exit * Notify prompt on tsh exit * Review: context.WithTimeout and Notify on os.Exit