window: don't add encrypted prompts to input history

This commit is contained in:
Benoit Pierre
2015-02-05 15:05:56 +01:00
committed by Andrzej Rybczak
parent af17e7eadf
commit e5e61842c5
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@@ -1,6 +1,7 @@
ncmpcpp-0.6.3 (????-??-??) ncmpcpp-0.6.3 (????-??-??)
* Fix floating point exception when adding a specific number of random items. * Fix floating point exception when adding a specific number of random items.
* Passwords are no longer added to the input history.
ncmpcpp-0.6.2 (2014-12-13) ncmpcpp-0.6.2 (2014-12-13)

View File

@@ -820,7 +820,7 @@ std::string Window::getString(const std::string &base, size_t width, bool encryp
curs_set(0); curs_set(0);
if (input != nullptr) if (input != nullptr)
{ {
if (input[0] != 0) if (!encrypted && input[0] != 0)
add_history(input); add_history(input);
result = input; result = input;
free(input); free(input);