Stop logging value of METEOR_SETTINGS when it is not valid JSON. (#9843)

In many production systems logs from the application will be forwarded to various logging systems, sometimes third party ones. All credentials in your settings will be leaked if you have any errors in your json.

Feature request can be found here
https://github.com/meteor/meteor-feature-requests/issues/293.
This commit is contained in:
Carl Littke
2018-04-27 14:10:40 +02:00
committed by Jesse Rosenberger
parent 498f5d32dd
commit b6a385dfb2

View File

@@ -21,7 +21,7 @@ if (process.env.METEOR_SETTINGS) {
try {
Meteor.settings = JSON.parse(process.env.METEOR_SETTINGS);
} catch (e) {
throw new Error("METEOR_SETTINGS are not valid JSON: " + process.env.METEOR_SETTINGS);
throw new Error("METEOR_SETTINGS are not valid JSON.");
}
}