mask password textedit before assigning password. This ensures that there is not the fraction of a second where the password might be visible.

This commit is contained in:
Philipp Crocoll
2024-12-31 14:00:24 +01:00
parent f0d9c8134e
commit 33c1f5d6dd

View File

@@ -973,16 +973,16 @@ namespace keepass2android
try
{
var masterPassword = _biometricDec.DecryptStored(Database.GetFingerprintPrefKey(_ioConnection));
_password = FindViewById<EditText>(Resource.Id.password_edit).Text = masterPassword;
//first mask the password textedit before assigning the password:
if (_showPassword)
{
_showPassword = false;
MakePasswordMaskedOrVisible();
}
_password = FindViewById<EditText>(Resource.Id.password_edit).Text = masterPassword;
FindViewById<EditText>(Resource.Id.password_edit).Enabled = false; //prevent accidental modification of password
FindViewById<EditText>(Resource.Id.password_edit).Enabled = false; //prevent accidental modification of password
}
catch (Java.Security.GeneralSecurityException ex)