VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-16 15:43:45 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-16 15:43:45 +0100
commitfcb220e39ad0cb051f097a674898683c4531e5c9 (patch)
treec04b655dd450f2b1f3612daf34ccf0bef43503cb /src/Common/Password.c
parent0d92195c91ec07f2a72d4e4c952bfff672983fa3 (diff)
parent36f71280faf32cdea46b270ae40d71cb46032039 (diff)
downloadVeraCrypt-fcb220e39ad0cb051f097a674898683c4531e5c9.tar.gz
VeraCrypt-fcb220e39ad0cb051f097a674898683c4531e5c9.zip
Merge branch 'master' of https://github.com/e2Security/VeraCrypt into e2Security-master
Changes made to src/Common/Dlgcode.c and src/Common/Language.xml to resolve conflicts. For Language.xml, new entries were put at the end and remove entries were put back in order to keep same order to entries as before. This important for compatibility with Transifex translation platform.
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 4caf3a21..3c9faa82 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -39,6 +39,7 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword,
char szTmp1Utf8[MAX_PASSWORD + 1];
char szTmp2Utf8[MAX_PASSWORD + 1];
int k = GetWindowTextLength (hPassword);
+ int j = GetWindowTextLength (hVerify);
BOOL bEnable = FALSE;
int utf8Len1, utf8Len2;
@@ -51,7 +52,12 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword,
utf8Len2 = WideCharToMultiByte (CP_UTF8, 0, szTmp2, -1, szTmp2Utf8, MAX_PASSWORD + 1, NULL, NULL);
if (wcscmp (szTmp1, szTmp2) != 0)
+ {
bEnable = FALSE;
+ if(k > 0 && j == k)
+ Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg);
+
+ }
else if (utf8Len1 <= 0)
bEnable = FALSE;
else
@@ -145,11 +151,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)
@@ -563,4 +564,3 @@ error:
return nStatus;
}
-