Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
AppProperties.set("DEV_STATIC_MAX_AGE", props["dev.static.max.age"]);
AppProperties.set("AVAILABLE_LOCALES", props["available.locales"]);
AppProperties.set("SCHEMA_LIST_MODEL_EVENTS", props["schema.list.model.events"]);
AppProperties.set("SERVER_PORT", props["server.port"]);
AppProperties.set("MAIL_KNOWN_SMTP", props["mail.known.smtp"]);
AppProperties.set("MAIL_HOST", props["mail.host"]);
AppProperties.set("MAIL_PORT", props["mail.port"]);
AppProperties.set("MAIL_AUTH_USER", props["mail.auth.user"]);
AppProperties.set("MAIL_AUTH_PASSWORD", props["mail.auth.password"]);
AppProperties.set("STARTUP_MAIL_TEST", props["startup.mail.test"]);
AppProperties.set("APP_STARTUP_ACTIONS_FILE", props["app.startup.actions.file"]);
AppProperties.set("REQ_MIDDLEWARES", props["req.middlewares"]);
//OAuth accounts login config
var accounts = props["enabled.login.accounts"];
accounts = accounts || AppProperties.get("ENABLED_LOGIN_ACCOUNTS");
if (accounts) {
AppProperties.set("ENABLED_LOGIN_ACCOUNTS", accounts);
accounts = accounts.split(",");
var accConfig = {};
_.each(props, function (value, key) {
var split = key.split(".");
var acc = split[0];
if (acc && _.contains(accounts, acc)) {
accConfig[acc] = accConfig[acc] || {};
//trying to convert string array into array
try {
value = eval(value);
}
catch (e) {
}