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 3c9faa82..4caf3a21 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -39,7 +39,6 @@ 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; @@ -52,12 +51,7 @@ 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 @@ -151,6 +145,11 @@ 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) @@ -564,3 +563,4 @@ error: return nStatus; } + |