1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Keep PIM secret and re-ask when user entered a wrong value (#1026)

Co-authored-by: Bogdan Drozdowski <>
This commit is contained in:
Bogdan Drozdowski
2023-05-21 17:21:21 +02:00
committed by GitHub
parent 76df737ae5
commit b05b18928f

View File

@@ -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)));
}