fix: extract config string for custom configs when determining whether to encrypt sensitive information

This commit is contained in:
Viren070
2025-03-18 13:27:25 +00:00
parent 960de88cc5
commit 57649f07f6
+9 -1
View File
@@ -131,7 +131,15 @@ app.get('/:config/configure', (req, res) => {
}
try {
let configJson = extractJsonConfig(config);
if (isValueEncrypted(config)) {
let configString = config;
if (CUSTOM_CONFIGS) {
const customConfig = extractCustomConfig(config);
if (customConfig) {
configJson = customConfig;
configString = decodeURIComponent(CUSTOM_CONFIGS[config]);
}
}
if (isValueEncrypted(configString)) {
logger.info(`Encrypted config detected, encrypting credentials`);
configJson = encryptInfoInConfig(configJson);
}