profiles: Check for empty password before redrawing the UI

This commit is contained in:
Owain van Brakel
2019-09-04 12:36:48 +02:00
parent 9aeb02bd46
commit af8fc79067

View File

@@ -373,6 +373,12 @@ class ProfilesPanel extends PluginPanel
private void decryptAccounts()
{
if (txtDecryptPassword.getPassword().length == 0 || String.valueOf(txtDecryptPassword.getPassword()).equals(UNLOCK_PASSWORD))
{
showErrorMessage("Unable to load data", "Please enter a password!");
return;
}
boolean error = false;
try
{
@@ -472,11 +478,6 @@ class ProfilesPanel extends PluginPanel
String tmp = profilesConfig.profilesData();
if (tmp.startsWith("¬"))
{
if (txtDecryptPassword.getPassword().length == 0 || String.valueOf(txtDecryptPassword.getPassword()).equals(UNLOCK_PASSWORD))
{
showErrorMessage("Unable to load data", "Please enter a password!");
return tmp;
}
tmp = tmp.substring(1);
return decryptText(base64Decode(tmp), getAesKey());
}