diff options
author | felixreichmann <30237956+felixreichmann@users.noreply.github.com> | 2021-12-17 15:27:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 15:27:04 +0100 |
commit | 36f71280faf32cdea46b270ae40d71cb46032039 (patch) | |
tree | 2c70125105a9662de8ab6651e775e8227b3e6765 /src/Common/Password.c | |
parent | 1c51a76c7eab117bb6c74a3897a6df8197945c90 (diff) | |
parent | 7499ae384f8a64d04070a5ee0ae29b944a50bbcc (diff) | |
download | VeraCrypt-36f71280faf32cdea46b270ae40d71cb46032039.tar.gz VeraCrypt-36f71280faf32cdea46b270ae40d71cb46032039.zip |
Merge pull request #1 from e2Security/NewInterface
System Encryption: translate password to US keyboard layout + improveā¦
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r-- | src/Common/Password.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c index f280de33..8c94fc06 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -50,12 +50,12 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, utf8Len1 = WideCharToMultiByte (CP_UTF8, 0, szTmp1, -1, szTmp1Utf8, MAX_PASSWORD + 1, NULL, NULL); utf8Len2 = WideCharToMultiByte (CP_UTF8, 0, szTmp2, -1, szTmp2Utf8, MAX_PASSWORD + 1, NULL, NULL); - if (wcscmp (szTmp1, szTmp2) != 0){ + if (wcscmp (szTmp1, szTmp2) != 0) + { bEnable = FALSE; - if(k>0){ - if(j>=k) - Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg); - } + if(k > 0 && j == k) + Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg); + } else if (utf8Len1 <= 0) bEnable = FALSE; @@ -150,11 +150,6 @@ BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim Error (bootPimCondition? "BOOT_PIM_REQUIRE_LONG_PASSWORD": "PIM_REQUIRE_LONG_PASSWORD", hwndDlg); return FALSE; } - -#ifndef _DEBUG - if (!bSkipPasswordWarning && (MessageBoxW (hwndDlg, GetString ("PASSWORD_LENGTH_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)) - return FALSE; -#endif } #ifndef _DEBUG else if (bCustomPimSmall) @@ -568,4 +563,3 @@ error: return nStatus; } - |