4 Commits

Author SHA1 Message Date
Þórhallur Sverrisson
8bdd74cfe6 Remove DEL characters from password input (#5837)
* Remove DEL characters from password input

iTerm password manager sends \x03\0x7f before sending a password
from its password manager to make sure the password is not being
echoed to the screen.  Unfortunately, vault login does not handle
the Space DEL sequence, causing the login to fail when using the
password manager.  This patch uses a simple method to delete the
sequence if present anywhere in the string, although it is strictly
only needed at the start of input.

* Simplify iTerm handling to only remove iTerm prefix

The logic now only removes the two byte prefix sent in by iTerm
instead of trying to remove all deletes in the string.

This has been tested to work with the iTerm password manager.

As a small correction, the byte sequence is \x20\x7f.  The
earlier commit message incorrectly stated it was \x03\x7f.
2018-12-12 15:06:10 -05:00
Mitchell Hashimoto
2768509c27 helper/password: interrupt should exit readline 2015-10-16 16:01:19 -07:00
Mitchell Hashimoto
1e7a94f6ba helper/password: catch ctrl-c if possible 2015-04-01 17:27:29 -07:00
Mitchell Hashimoto
205857be65 helper/password: for reading passwords securely 2015-03-04 00:31:35 -08:00