VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBogdan Drozdowski <93281795+bogdro@users.noreply.github.com>2023-05-21 17:21:21 +0200
committerGitHub <noreply@github.com>2023-05-21 17:21:21 +0200
commitb05b18928f4291b7c24cbe0046e4d5b3f44705d0 (patch)
tree8e2fec396f1abad7091897646fb8202921c8d925 /src
parent76df737ae5148187585b3a74fc17074f06a290e4 (diff)
downloadVeraCrypt-b05b18928f4291b7c24cbe0046e4d5b3f44705d0.tar.gz
VeraCrypt-b05b18928f4291b7c24cbe0046e4d5b3f44705d0.zip
Keep PIM secret and re-ask when user entered a wrong value (#1026)
Co-authored-by: Bogdan Drozdowski <>
Diffstat (limited to 'src')
-rw-r--r--src/Main/TextUserInterface.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 7233b8b6..e972163b 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -175,9 +175,13 @@ namespace VeraCrypt
wxString msg = _("Enter new PIM: ");
if (!message.empty())
msg = message + L": ";
+ SetTerminalEcho (false);
+ finally_do ({ TextUserInterface::SetTerminalEcho (true); });
while (pim < 0)
{
wstring pimStr = AskString (msg);
+ ShowString (L"\n");
+
if (pimStr.empty())
pim = 0;
else
@@ -1290,7 +1294,7 @@ namespace VeraCrypt
options.Password = AskPassword (StringFormatter (_("Enter password for {0}"), wstring (*options.Path)));
}
- if (!options.TrueCryptMode && (options.Pim < 0))
+ if (!options.TrueCryptMode /*&& (options.Pim < 0) re-ask in case of wrong value entered*/)
{
options.Pim = AskPim (StringFormatter (_("Enter PIM for {0}"), wstring (*options.Path)));
}