From 4eef661c15d750bb19a1673760ce35330a26091c Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Mon, 26 Mar 2018 20:15:25 +0200 Subject: [PATCH 1/2] Rename forgotten values Looks like we forgot something during the migration. This should fix it. Signed-off-by: Sheogorath --- lib/config/defaultSSL.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config/defaultSSL.js b/lib/config/defaultSSL.js index 362c62a1..ba020466 100644 --- a/lib/config/defaultSSL.js +++ b/lib/config/defaultSSL.js @@ -10,8 +10,8 @@ function getFile (path) { } module.exports = { - sslkeypath: getFile('/run/secrets/key.pem'), - sslcertpath: getFile('/run/secrets/cert.pem'), - sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [], - dhparampath: getFile('/run/secrets/dhparam.pem') + sslKeyPath: getFile('/run/secrets/key.pem'), + sslCertPath: getFile('/run/secrets/cert.pem'), + sslCAPath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [], + dhParamPath: getFile('/run/secrets/dhparam.pem') } From 10a81e7db247ae70f589c6008d0c99da3881201c Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Mon, 26 Mar 2018 20:49:24 +0200 Subject: [PATCH 2/2] Fix logical error in legacy config expression We should check for an undefined and not just for a logical true or false. Example: When `usecdn` was set to false it was impossible to overwrite the new config value because the if statement becomes false. Thanks @davidmehren for pointing me to this issue. Signed-off-by: Sheogorath --- lib/config/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/index.js b/lib/config/index.js index fae51e52..cc71564b 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -110,8 +110,8 @@ for (let i = keys.length; i--;) { // and the config with uppercase is not set // we set the new config using the old key. if (uppercase.test(keys[i]) && - config[lowercaseKey] && - !config[keys[1]]) { + config[lowercaseKey] !== undefined && + fileConfig[keys[i]] === undefined) { logger.warn('config.js contains deprecated lowercase setting for ' + keys[i] + '. Please change your config.js file to replace ' + lowercaseKey + ' with ' + keys[i]) config[keys[i]] = config[lowercaseKey] }