machinepack-redis
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -127,2 +127,24 @@ module.exports = { | ||
function onPreConnectionError (err){ | ||
// If this is an authentication error (i.e. bad password), then | ||
// we won't be getting an `end` event, so we'll bail out immediately. | ||
if (err.command === 'AUTH' && err.code === 'ERR') { | ||
client.removeListener('end', onPreConnectionEnd); | ||
client.removeListener('error', onPreConnectionError); | ||
// Swallow follow-on errors. | ||
client.on('error', function(){}); | ||
return exits.failed({ | ||
error: flaverr('ERR_BAD_PASSWORD', new Error('The password supplied to the Redis server was incorrect.')) | ||
}); | ||
} | ||
// If this is an authentication "info" event (i.e. NO password was supplied), | ||
// and the `authLater` meta key isn't `true`, bail out immediately. | ||
if (err.command === 'INFO' && err.code === 'NOAUTH' && inputs.meta.authLater !== true) { | ||
client.removeListener('end', onPreConnectionEnd); | ||
client.removeListener('error', onPreConnectionError); | ||
// Swallow follow-on errors. | ||
client.on('error', function(){}); | ||
return exits.failed({ | ||
error: flaverr('ERR_NO_PASSWORD', new Error('The Redis server requires a password, but none was supplied.')) | ||
}); | ||
} | ||
redisConnectionError = err; | ||
@@ -129,0 +151,0 @@ } |
{ | ||
"name": "machinepack-redis", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "Structured Node.js bindings for Redis.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
88229
1727
0