From 41ba7a06d3ac55752f9f50a1454eacdda62b1ae4 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 7 Aug 2018 00:56:56 +0200 Subject: Windows: Display a balloon tip warning or error message when the value pasted to password field is truncated or when there is no room for additional characters because of maximum password length reached --- Translations/Language.ar.xml | 2 + Translations/Language.be.xml | 2 + Translations/Language.bg.xml | 2 + Translations/Language.ca.xml | 2 + Translations/Language.cs.xml | 2 + Translations/Language.da.xml | 2 + Translations/Language.de.xml | 2 + Translations/Language.el.xml | 2 + Translations/Language.es.xml | 2 + Translations/Language.et.xml | 2 + Translations/Language.eu.xml | 2 + Translations/Language.fa.xml | 2 + Translations/Language.fi.xml | 2 + Translations/Language.fr.xml | 4 +- Translations/Language.hu.xml | 2 + Translations/Language.id.xml | 2 + Translations/Language.it.xml | 2 + Translations/Language.ja.xml | 2 + Translations/Language.ka.xml | 2 + Translations/Language.ko.xml | 2 + Translations/Language.lv.xml | 2 + Translations/Language.my.xml | 2 + Translations/Language.nl.xml | 2 + Translations/Language.nn.xml | 2 + Translations/Language.pl.xml | 2 + Translations/Language.pt-br.xml | 2 + Translations/Language.ro.xml | 2 + Translations/Language.ru.xml | 2 + Translations/Language.sk.xml | 2 + Translations/Language.sl.xml | 2 + Translations/Language.sv.xml | 2 + Translations/Language.th.xml | 2 + Translations/Language.tr.xml | 2 + Translations/Language.uk.xml | 2 + Translations/Language.uz.xml | 2 + Translations/Language.vi.xml | 2 + Translations/Language.zh-cn.xml | 2 + Translations/Language.zh-hk.xml | 2 + Translations/Language.zh-tw.xml | 2 + src/Common/Dlgcode.c | 136 +++++++++++++++++++++++++++++++++++++++- src/Common/Dlgcode.h | 1 + src/Common/Language.xml | 2 + src/ExpandVolume/WinMain.cpp | 2 +- src/Format/Tcformat.c | 6 +- src/Mount/Mount.c | 10 +-- 45 files changed, 225 insertions(+), 12 deletions(-) diff --git a/Translations/Language.ar.xml b/Translations/Language.ar.xml index 223cba48..feabba7f 100644 --- a/Translations/Language.ar.xml +++ b/Translations/Language.ar.xml @@ -1421,6 +1421,8 @@ امنع أمر TRIM للقسم/المحارف النظامي ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.be.xml b/Translations/Language.be.xml index 8f608729..8d51cd1f 100644 --- a/Translations/Language.be.xml +++ b/Translations/Language.be.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.bg.xml b/Translations/Language.bg.xml index 14ac4127..ee6f3694 100644 --- a/Translations/Language.bg.xml +++ b/Translations/Language.bg.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ca.xml b/Translations/Language.ca.xml index 4bc7baa3..63021d76 100644 --- a/Translations/Language.ca.xml +++ b/Translations/Language.ca.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.cs.xml b/Translations/Language.cs.xml index 2793243f..8a443b5f 100644 --- a/Translations/Language.cs.xml +++ b/Translations/Language.cs.xml @@ -1422,6 +1422,8 @@ Zakázat příkazy TRIM na systémových diskových oddílech/discích ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.da.xml b/Translations/Language.da.xml index 1fe767e1..4ffa52b2 100644 --- a/Translations/Language.da.xml +++ b/Translations/Language.da.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.de.xml b/Translations/Language.de.xml index 0a66e895..fe3fe859 100644 --- a/Translations/Language.de.xml +++ b/Translations/Language.de.xml @@ -1424,6 +1424,8 @@ TRIM-Befehl auf Systempartition/Laufwerk blockieren FEHLER: Windows-EFI-Systemlader konnte nicht auf der Festplatte gefunden werden. Operation wird abgebrochen. Es ist derzeit nicht möglich, ein System zu verschlüsseln, wenn SecureBoot aktiviert ist und keine benutzerdefinierten Schlüssel von VeraCrypt in die Maschinen-Firmware geladen sind. SecureBoot muss in der BIOS-Konfiguration deaktiviert werden, damit die Systemverschlüsselung fortgesetzt werden kann. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.el.xml b/Translations/Language.el.xml index a69a8a58..ad2d205e 100644 --- a/Translations/Language.el.xml +++ b/Translations/Language.el.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.es.xml b/Translations/Language.es.xml index 9c53cf81..920c7c36 100644 --- a/Translations/Language.es.xml +++ b/Translations/Language.es.xml @@ -1421,6 +1421,8 @@ Bloquear órdenes TRIM en particiones/unidades del sistema ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.et.xml b/Translations/Language.et.xml index 9af2ea3a..8d0c1bbf 100644 --- a/Translations/Language.et.xml +++ b/Translations/Language.et.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.eu.xml b/Translations/Language.eu.xml index 084aefdc..3a53120d 100644 --- a/Translations/Language.eu.xml +++ b/Translations/Language.eu.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.fa.xml b/Translations/Language.fa.xml index 4ec29739..44e36a39 100644 --- a/Translations/Language.fa.xml +++ b/Translations/Language.fa.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.fi.xml b/Translations/Language.fi.xml index 7ce96eba..7489b9e4 100644 --- a/Translations/Language.fi.xml +++ b/Translations/Language.fi.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.fr.xml b/Translations/Language.fr.xml index 9b1945c5..c12c5ba4 100644 --- a/Translations/Language.fr.xml +++ b/Translations/Language.fr.xml @@ -1416,11 +1416,13 @@ AVERTISSEMENT : Les utilisateurs novices ne devraient pas modifier manuellement le fichier de configuration du chargeur de démarrage.\n\nContinuer ? ATTENTION: échec de la validation du format XML du fichier de configuration du chargeur de démarrage. Merci de vérifier vos modifications. Options Avancées - It is strongly recommended that you create a new VeraCrypt Rescue Disk (which will contain the new version of the VeraCrypt Boot Loader) by selecting 'System' > 'Create Rescue Disk'.\nDo you want to do it now? + Il est fortement recommandé de créer un nouveau disque de secours VeraCrypt (qui contiendra la nouvelle version du chargeur d'amorçage de VeraCrypt) en sélectionnant 'Système' > 'Créer un disque de secours'.\nVoulez-vous le faire maintenant? Autoriser la commande TRIM sur les disques SSD non système Bloquer la commande TRIM sur la partition/disque système ERREUR: Le chargeur de démarrage système EFI de Windows n'a pas pu être trouvé sur le disque. L'opération va être interrompue. Il n'est actuellement pas possible de chiffrer un système si SecureBoot est activé et si les clefs personnalisées de VeraCrypt ne sont pas chargées dans le firmware de la machine. SecureBoot doit être désactivé dans la configuration du BIOS afin de permettre d'effectuer le chiffrement du système. + Le texte collé a été tronqué car la taille maximale du mot de passe est 64 caractères + Le mot de passe a déjà atteint sa taille maximale de 64 caractères.\nAucun caractère supplémentaire n'est autorisé. diff --git a/Translations/Language.hu.xml b/Translations/Language.hu.xml index 065f9af1..b5025507 100644 --- a/Translations/Language.hu.xml +++ b/Translations/Language.hu.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.id.xml b/Translations/Language.id.xml index 3fdd5e51..696fba19 100644 --- a/Translations/Language.id.xml +++ b/Translations/Language.id.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.it.xml b/Translations/Language.it.xml index 1255243c..be1fc871 100644 --- a/Translations/Language.it.xml +++ b/Translations/Language.it.xml @@ -1421,6 +1421,8 @@ Blocca comandi TRIM sulla partizione/disco di sistema ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ja.xml b/Translations/Language.ja.xml index fd987d70..4dc91dfd 100644 --- a/Translations/Language.ja.xml +++ b/Translations/Language.ja.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ka.xml b/Translations/Language.ka.xml index bfa484c9..a07d4828 100644 --- a/Translations/Language.ka.xml +++ b/Translations/Language.ka.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ko.xml b/Translations/Language.ko.xml index 52e55be8..a1e50092 100644 --- a/Translations/Language.ko.xml +++ b/Translations/Language.ko.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.lv.xml b/Translations/Language.lv.xml index f91e6598..c6652b76 100644 --- a/Translations/Language.lv.xml +++ b/Translations/Language.lv.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.my.xml b/Translations/Language.my.xml index d7d2e04b..7e763947 100644 --- a/Translations/Language.my.xml +++ b/Translations/Language.my.xml @@ -1423,6 +1423,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.nl.xml b/Translations/Language.nl.xml index db9d5518..c6c3d95f 100644 --- a/Translations/Language.nl.xml +++ b/Translations/Language.nl.xml @@ -1422,6 +1422,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.nn.xml b/Translations/Language.nn.xml index 1722167b..d721f73b 100644 --- a/Translations/Language.nn.xml +++ b/Translations/Language.nn.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.pl.xml b/Translations/Language.pl.xml index 9b258652..4d526e9d 100644 --- a/Translations/Language.pl.xml +++ b/Translations/Language.pl.xml @@ -1421,6 +1421,8 @@ Blokuj komendę TRIM na systemowej partycji/napędzie BŁĄD: Nie można zlokalizować programu rozruchowego EFI systemu Windows na dysku. Operacja zostanie przerwana. Obecnie nie jest możliwe szyfrowanie systemu, gdy włączona jest funkcja SecureBoot, a niestandardowe klucze VeraCrypt nie zostały załadowane do oprogramowania sprzętowego urządzenia. Funkcja SecureBoot musi być wyłączona w konfiguracji BIOS-u, aby umożliwić kontynuowanie szyfrowania systemu. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.pt-br.xml b/Translations/Language.pt-br.xml index cbc87f09..656c5acf 100644 --- a/Translations/Language.pt-br.xml +++ b/Translations/Language.pt-br.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ro.xml b/Translations/Language.ro.xml index ae0d127a..9ebaaae4 100644 --- a/Translations/Language.ro.xml +++ b/Translations/Language.ro.xml @@ -1421,6 +1421,8 @@ Blocare comandă TRIM pe partițiile/unitățile sistem ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.ru.xml b/Translations/Language.ru.xml index 0e45913d..d1f05af3 100644 --- a/Translations/Language.ru.xml +++ b/Translations/Language.ru.xml @@ -1421,6 +1421,8 @@ Блокировать команду TRIM на системном разделе/диске ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.sk.xml b/Translations/Language.sk.xml index 46ea64f7..d3d4cf03 100644 --- a/Translations/Language.sk.xml +++ b/Translations/Language.sk.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.sl.xml b/Translations/Language.sl.xml index c4b9f5e7..7a7ac472 100644 --- a/Translations/Language.sl.xml +++ b/Translations/Language.sl.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.sv.xml b/Translations/Language.sv.xml index bea595b6..83d6a2d7 100644 --- a/Translations/Language.sv.xml +++ b/Translations/Language.sv.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.th.xml b/Translations/Language.th.xml index 308e3b38..9bd51465 100644 --- a/Translations/Language.th.xml +++ b/Translations/Language.th.xml @@ -1422,6 +1422,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.tr.xml b/Translations/Language.tr.xml index 1afc788b..9eda2e14 100644 --- a/Translations/Language.tr.xml +++ b/Translations/Language.tr.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.uk.xml b/Translations/Language.uk.xml index 3a4f441f..36521d0c 100644 --- a/Translations/Language.uk.xml +++ b/Translations/Language.uk.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.uz.xml b/Translations/Language.uz.xml index cc8ce3a3..68fa829f 100644 --- a/Translations/Language.uz.xml +++ b/Translations/Language.uz.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.vi.xml b/Translations/Language.vi.xml index c159c1cb..c1c9b332 100644 --- a/Translations/Language.vi.xml +++ b/Translations/Language.vi.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.zh-cn.xml b/Translations/Language.zh-cn.xml index 463d7ebb..67f23a50 100644 --- a/Translations/Language.zh-cn.xml +++ b/Translations/Language.zh-cn.xml @@ -1421,6 +1421,8 @@ 阻止系统分区/磁盘上使用 TRIM 命令 ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.zh-hk.xml b/Translations/Language.zh-hk.xml index f3756ae5..f17ef729 100644 --- a/Translations/Language.zh-hk.xml +++ b/Translations/Language.zh-hk.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/Translations/Language.zh-tw.xml b/Translations/Language.zh-tw.xml index 6af2fa87..b90a4629 100644 --- a/Translations/Language.zh-tw.xml +++ b/Translations/Language.zh-tw.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index bbe836e7..4d3fdc78 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -81,6 +81,18 @@ #pragma comment( lib, "setupapi.lib" ) +#ifndef TTI_INFO_LARGE +#define TTI_INFO_LARGE 4 +#endif + +#ifndef TTI_WARNING_LARGE +#define TTI_WARNING_LARGE 5 +#endif + +#ifndef TTI_ERROR_LARGE +#define TTI_ERROR_LARGE 6 +#endif + /* GPT Partition Type GUIDs */ #define LOCAL_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name = {l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8} LOCAL_DEFINE_GUID(PARTITION_ENTRY_UNUSED_GUID, 0x00000000L, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); // Entry unused @@ -1178,11 +1190,131 @@ static LRESULT CALLBACK BootPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam void ToBootPwdField (HWND hwndDlg, UINT ctrlId) { HWND hwndCtrl = GetDlgItem (hwndDlg, ctrlId); - - SetWindowLongPtrW (hwndCtrl, GWLP_USERDATA, (LONG_PTR) GetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC)); + WNDPROC originalwp = (WNDPROC) GetWindowLongPtrW (hwndCtrl, GWLP_USERDATA); + // if ToNormalPwdField has been called before, GWLP_USERDATA already contains original WNDPROC + if (!originalwp) + { + SetWindowLongPtrW (hwndCtrl, GWLP_USERDATA, (LONG_PTR) GetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC)); + } SetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) BootPwdFieldProc); } +// Ensures that a warning is displayed when user is pasting a password longer than the maximum +// length which is set to 64 characters +static LRESULT CALLBACK NormalPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + WNDPROC wp = (WNDPROC) GetWindowLongPtrW (hwnd, GWLP_USERDATA); + + switch (message) + { + case WM_PASTE: + { + bool bBlock = false; + if (OpenClipboard (NULL)) + { + HANDLE h = GetClipboardData (CF_UNICODETEXT); + if (h) + { + wchar_t *pchData = (wchar_t*)GlobalLock(h); + int txtlen = 0; + while (*pchData) + { + if (*pchData == '\r' || *pchData == '\n') + break; + else + { + txtlen++; + pchData++; + } + } + + if (txtlen) + { + int curLen = GetWindowTextLength (hwnd); + if (curLen == MAX_PASSWORD) + { + EDITBALLOONTIP ebt; + + ebt.cbStruct = sizeof( EDITBALLOONTIP ); + ebt.pszText = GetString ("PASSWORD_MAXLENGTH_REACHED"); + ebt.pszTitle = lpszTitle; + ebt.ttiIcon = TTI_ERROR_LARGE; // tooltip warning icon + + SendMessage(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM)&ebt); + + MessageBeep (0xFFFFFFFF); + + bBlock = true; + } + else if ((txtlen + curLen) > MAX_PASSWORD) + { + EDITBALLOONTIP ebt; + + ebt.cbStruct = sizeof( EDITBALLOONTIP ); + ebt.pszText = GetString ("PASSWORD_PASTED_TRUNCATED"); + ebt.pszTitle = lpszTitle; + ebt.ttiIcon = TTI_WARNING_LARGE; // tooltip warning icon + + SendMessage(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM)&ebt); + + MessageBeep (0xFFFFFFFF); + } + else + SendMessage(hwnd, EM_HIDEBALLOONTIP, 0, 0); + } + GlobalUnlock(h); + } + CloseClipboard (); + } + + if (bBlock) + return FALSE; + } + break; + case WM_CHAR: + { + DWORD dwStartPos = 0, dwEndPos = 0; + short vk = VkKeyScanW ((WCHAR) wParam); + BYTE vkCode = LOBYTE (vk); + BYTE vkState = HIBYTE (vk); + bool ctrlPressed = (vkState & 2) && !(vkState & 4); + + // check if there is a selected text + SendMessage (hwnd, EM_GETSEL, (WPARAM) &dwStartPos, (LPARAM) &dwEndPos); + + if ((dwStartPos == dwEndPos) + && (vkCode != VK_DELETE) && (vkCode != VK_BACK) + && !ctrlPressed + && (GetWindowTextLength (hwnd) == MAX_PASSWORD)) + { + EDITBALLOONTIP ebt; + + ebt.cbStruct = sizeof( EDITBALLOONTIP ); + ebt.pszText = GetString ("PASSWORD_MAXLENGTH_REACHED"); + ebt.pszTitle = lpszTitle; + ebt.ttiIcon = TTI_ERROR_LARGE; // tooltip warning icon + + SendMessage(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM)&ebt); + + MessageBeep (0xFFFFFFFF); + } + else + SendMessage(hwnd, EM_HIDEBALLOONTIP, 0, 0); + } + break; + } + + return CallWindowProcW (wp, hwnd, message, wParam, lParam); +} + +void ToNormalPwdField (HWND hwndDlg, UINT ctrlId) +{ + HWND hwndCtrl = GetDlgItem (hwndDlg, ctrlId); + + SendMessage (hwndCtrl, EM_LIMITTEXT, MAX_PASSWORD, 0); + SetWindowLongPtrW (hwndCtrl, GWLP_USERDATA, (LONG_PTR) GetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC)); + SetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) NormalPwdFieldProc); +} // This function currently serves the following purposes: diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index ded84578..974d2e05 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -484,6 +484,7 @@ BOOL ToCustHyperlink (HWND hwndDlg, UINT ctrlId, HFONT hFont); void DisableCloseButton (HWND hwndDlg); void EnableCloseButton (HWND hwndDlg); void ToBootPwdField (HWND hwndDlg, UINT ctrlId); +void ToNormalPwdField (HWND hwndDlg, UINT ctrlId); void AccommodateTextField (HWND hwndDlg, UINT ctrlId, BOOL bFirstUpdate, HFONT hFont); BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize); BOOL GetSysDevicePaths (HWND hwndDlg); diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 8c1b3ca5..dc5ab171 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -1421,6 +1421,8 @@ Block TRIM command on system partition/drive ERROR: Windows EFI system loader could not be located on the disk. Operation will be aborted. It is currently not possible to encrypt a system if SecureBoot is enabled and if VeraCrypt custom keys are not loaded into the machine firmware. SecureBoot needs to be disabled in the BIOS configuration in order to allow system encryption to proceed. + Pasted text truncated because the password maximum length is 64 characters + Password already reached its maximum length of 64 characters.\nNo additional character is allowed. diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index 3fea0407..f6735891 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -440,7 +440,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA /* make autodetection the default */ SendMessage (hComboBox, CB_SETCURSEL, 0, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_PASSWORD); SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0); diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index c496a72b..54379715 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -4265,7 +4265,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa /* make autodetection the default */ SendMessage (hComboBox, CB_SETCURSEL, 0, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_PASSWORD_DIRECT); SetPassword (hwndDlg, IDC_PASSWORD_DIRECT, szRawPassword); @@ -4345,8 +4345,8 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa StringCbCopyW (str, sizeof(str), GetString ("PASSWORD_HELP")); } - SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY), EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_PASSWORD); + ToNormalPwdField (hwndDlg, IDC_VERIFY); SetPassword (hwndDlg, IDC_PASSWORD, szRawPassword); SetPassword (hwndDlg, IDC_VERIFY, szVerify); diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index e5f7b6fa..da1d74f9 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -2169,9 +2169,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowTextW (hwndDlg, GetString ("IDD_PASSWORDCHANGE_DLG")); LocalizeDialog (hwndDlg, "IDD_PASSWORDCHANGE_DLG"); - SendMessage (GetDlgItem (hwndDlg, IDC_OLD_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY), EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_OLD_PASSWORD); + ToNormalPwdField (hwndDlg, IDC_PASSWORD); + ToNormalPwdField (hwndDlg, IDC_VERIFY); SendMessage (GetDlgItem (hwndDlg, IDC_OLD_PIM), EM_LIMITTEXT, MAX_PIM, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0); EnableWindow (GetDlgItem (hwndDlg, IDOK), FALSE); @@ -2884,7 +2884,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa /* make autodetection the default unless a specific PRF was specified in the command line */ SendMessage (hComboBox, CB_SETCURSEL, defaultPrfIndex, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_PASSWORD); SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0); @@ -3575,7 +3575,7 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT, hidVolProtKeyFilesParam.EnableKeyFiles); - SendDlgItemMessage (hwndDlg, IDC_PASSWORD_PROT_HIDVOL, EM_LIMITTEXT, MAX_PASSWORD, 0); + ToNormalPwdField (hwndDlg, IDC_PASSWORD_PROT_HIDVOL); SendDlgItemMessage (hwndDlg, IDC_PIM, EM_LIMITTEXT, MAX_PIM, 0); if (mountOptions->ProtectedHidVolPassword.Length > 0) -- cgit v1.2.3