diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-03 00:18:48 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-03 00:20:49 +0100 |
commit | 453ef927ef734320a715de12ec8536e3a642bc26 (patch) | |
tree | 7491ef15d8b5e9b86e776b5f6b4af9689220a0f3 /src/Common/Password.c | |
parent | ea88c6175c19bbc2c063be63f64705733112ff0d (diff) | |
download | VeraCrypt-453ef927ef734320a715de12ec8536e3a642bc26.tar.gz VeraCrypt-453ef927ef734320a715de12ec8536e3a642bc26.zip |
Windows: Add option to use legacy maximum password length (64 characters) instead of new maximum length (128) in UI and command line. This will users who were relying on the UI truncating the passwords to the first 64 characters in the previous versions of VeraCrypt.
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r-- | src/Common/Password.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c index a5050d75..ca0dd468 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -112,7 +112,7 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw) wchar_t s[MAX_PASSWORD + 1]; len = GetWindowTextLength (hPassword); - if (len > MAX_PASSWORD) + if (len > (bUseLegacyMaxPasswordLength? MAX_LEGACY_PASSWORD: MAX_PASSWORD)) return FALSE; GetWindowTextW (hPassword, s, sizeof (s) / sizeof (wchar_t)); |