diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index b5197bb6c..e9b9ef18a 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -308,9 +308,12 @@ function testConfig(apiConfig, callback) { function removePrivateFields(apiConfig) { if (apiConfig.mountOptions && apiConfig.mountOptions.password) apiConfig.mountOptions.password = constants.SECRET_PLACEHOLDER; + if (apiConfig.mountOptions && apiConfig.mountOptions.privateKey) apiConfig.mountOptions.privateKey = constants.SECRET_PLACEHOLDER; + return apiConfig; } function injectPrivateFields(newConfig, currentConfig) { if (newConfig.mountOptions && currentConfig.mountOptions && newConfig.mountOptions.password === constants.SECRET_PLACEHOLDER) newConfig.mountOptions.password = currentConfig.mountOptions.password; + if (newConfig.mountOptions && currentConfig.mountOptions && newConfig.mountOptions.privateKey === constants.SECRET_PLACEHOLDER) newConfig.mountOptions.privateKey = currentConfig.mountOptions.privateKey; }