profiles: Check for empty password before redrawing the UI
This commit is contained in:
@@ -373,6 +373,12 @@ class ProfilesPanel extends PluginPanel
|
|||||||
|
|
||||||
private void decryptAccounts()
|
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;
|
boolean error = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -472,11 +478,6 @@ class ProfilesPanel extends PluginPanel
|
|||||||
String tmp = profilesConfig.profilesData();
|
String tmp = profilesConfig.profilesData();
|
||||||
if (tmp.startsWith("¬"))
|
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);
|
tmp = tmp.substring(1);
|
||||||
return decryptText(base64Decode(tmp), getAesKey());
|
return decryptText(base64Decode(tmp), getAesKey());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user