Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Replace timespan with Moment and remove security warnings #22
Conversation
| @@ -224,7 +224,7 @@ common.loggly = function () { | |||
| // | |||
| // retries to send buffered logs to loggly in every 30 seconds | |||
| // | |||
| if (timerFunctionForBufferedLogs === null) { | |||
| if (timerFunctionForBufferedLogs === null && bufferOptions) { | |||
Shwetajain148
Oct 10, 2017
Author
@mchaudhary @mostlyjason, At this point, if we are using the search functionality of our library like- (In our app.js file)
client.search('foo', function (err, results) {
console.dir(results.events);
});
Then the library does not set the bufferOptions object and when the library tries to access the bufferOptions.retriesInMilliSeconds property, an error is thrown so I put this check to enter into this block only when the bufferOptions object is set and has some value.
@mchaudhary @mostlyjason, At this point, if we are using the search functionality of our library like- (In our app.js file)
client.search('foo', function (err, results) {
console.dir(results.events);
});
Then the library does not set the bufferOptions object and when the library tries to access the bufferOptions.retriesInMilliSeconds property, an error is thrown so I put this check to enter into this block only when the bufferOptions object is set and has some value.
| @@ -258,7 +258,7 @@ common.loggly = function () { | |||
| // This function will store logs into buffer | |||
| // | |||
| function storeLogs(logs) { | |||
| if (!logs.length) return; | |||
| if (!logs.length || !bufferOptions) return; | |||
Shwetajain148
Oct 10, 2017
Author
@mchaudhary @mostlyjason The same condition lies here too. I put this check to store the logs only when the bufferOptions object is set and containing the value for retriesInMilliSeconds and size otherwise this code line will throw an error.
@mchaudhary @mostlyjason The same condition lies here too. I put this check to store the logs only when the bufferOptions object is set and containing the value for retriesInMilliSeconds and size otherwise this code line will throw an error.
@mchaudhary @mostlyjason, In this pull request, I have removed the timespan dependency which was causing the security vulnerability issues in node applications. The Node Security Platform shows these warnings in a node project.
This PR will fix the issue #20. Please review.