diff options
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r-- | src/Common/Password.c | 12 |
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 @@ -38,8 +38,9 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, wchar_t szTmp2[MAX_PASSWORD + 1]; char szTmp1Utf8[MAX_PASSWORD + 1]; char szTmp2Utf8[MAX_PASSWORD + 1]; int k = GetWindowTextLength (hPassword); + int j = GetWindowTextLength (hVerify); BOOL bEnable = FALSE; int utf8Len1, utf8Len2; UNREFERENCED_PARAMETER (hwndDlg); /* Remove warning */ @@ -50,9 +51,14 @@ 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) + { bEnable = FALSE; + if(k > 0 && j == k) + Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg); + + } else if (utf8Len1 <= 0) bEnable = FALSE; else { @@ -144,13 +150,8 @@ 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) { @@ -562,5 +563,4 @@ error: handleError (hwndDlg, nStatus, SRC_POS); return nStatus; } - |