[BUG] Don't try to initialize Encryption if secret failed to generate

This commit is contained in:
2023-10-28 13:56:31 +02:00
parent 6637646971
commit faecdec301

View File

@@ -53,10 +53,14 @@ public final class EncryptionUtil {
BotController.INSTANCE.getLogger().error("Failed to initialize Encryption", e);
}
encryptor = new StandardPBEStringEncryptor();
encryptor.setPassword(encCode);
canRun = !encCode.isEmpty();
encryptor = new StandardPBEStringEncryptor();
if (canRun)
encryptor.setPassword(encCode);
if (!canRun)
BotController.INSTANCE.getLogger().error("Failed to initialize encryption system. Your config values will not be encrypted!");
}
/**