Socket
Socket
Sign inDemoInstall

mongodb-core

Package Overview
Dependencies
8
Maintainers
3
Versions
177
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.1 to 3.2.2

11

HISTORY.md

@@ -5,2 +5,13 @@ # Change Log

<a name="3.2.2"></a>
## [3.2.2](https://github.com/mongodb-js/mongodb-core/compare/v3.2.1...v3.2.2) (2019-03-22)
### Bug Fixes
* do not attempt to auth against an arbiter ([72bb011](https://github.com/mongodb-js/mongodb-core/commit/72bb011))
* **connection:** do not leak a connection if initial handshak fails ([6cba222](https://github.com/mongodb-js/mongodb-core/commit/6cba222))
<a name="3.2.1"></a>

@@ -7,0 +18,0 @@ ## [3.2.1](https://github.com/mongodb-js/mongodb-core/compare/v3.2.0...v3.2.1) (2019-03-21)

20

lib/connection/connect.js

@@ -103,3 +103,10 @@ 'use strict';

function performInitialHandshake(conn, options, callback) {
function performInitialHandshake(conn, options, _callback) {
const callback = function(err, ret) {
if (err && conn) {
conn.destroy();
}
_callback(err, ret);
};
let compressors = [];

@@ -159,3 +166,3 @@ if (options.compression && options.compression.compressors) {

const credentials = options.credentials;
if (credentials) {
if (!ismaster.arbiterOnly && credentials) {
credentials.resolveAuthMechanism(ismaster);

@@ -234,3 +241,3 @@ authenticate(conn, credentials, callback);

function makeConnection(family, options, callback) {
function makeConnection(family, options, _callback) {
const useSsl = typeof options.ssl === 'boolean' ? options.ssl : false;

@@ -252,2 +259,9 @@ const keepAlive = typeof options.keepAlive === 'boolean' ? options.keepAlive : true;

let socket;
const callback = function(err, ret) {
if (err && socket) {
socket.destroy();
}
_callback(err, ret);
};
try {

@@ -254,0 +268,0 @@ if (useSsl) {

2

package.json
{
"name": "mongodb-core",
"version": "3.2.1",
"version": "3.2.2",
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc