Socket
Socket
Sign inDemoInstall

mysql

Package Overview
Dependencies
Maintainers
9
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql - npm Package Compare versions

Comparing version 2.10.1 to 2.10.2

5

Changes.md

@@ -7,2 +7,7 @@ # Changes

## v2.10.2 (2016-01-12)
* Fix exception/hang from certain SSL connection errors #1153
* Update `bignumber.js` to 2.1.4
## v2.10.1 (2016-01-11)

@@ -9,0 +14,0 @@

@@ -280,2 +280,3 @@ var Crypto = require('crypto');

Connection.prototype._startTLS = function _startTLS(onSecure) {
var connection = this;
var secureContext = tls.createSecureContext({

@@ -295,2 +296,3 @@ ca : this.config.ssl.ca,

var rejectUnauthorized = this.config.ssl.rejectUnauthorized;
var secureEstablished = false;
var secureSocket = new tls.TLSSocket(this._socket, {

@@ -303,2 +305,11 @@ rejectUnauthorized : rejectUnauthorized,

// error handler for secure socket
secureSocket.on('_tlsError', function(err) {
if (secureEstablished) {
connection._handleNetworkError(err);
} else {
onSecure(err);
}
})
// cleartext <-> protocol

@@ -311,2 +322,4 @@ secureSocket.pipe(this._protocol);

secureSocket.on('secure', function() {
secureEstablished = true;
onSecure(rejectUnauthorized ? this.ssl.verifyError() : null);

@@ -326,2 +339,3 @@ });

var connection = this;
var credentials = Crypto.createCredentials({

@@ -336,4 +350,14 @@ ca : this.config.ssl.ca,

var rejectUnauthorized = this.config.ssl.rejectUnauthorized;
var secureEstablished = false;
var securePair = tls.createSecurePair(credentials, false, true, rejectUnauthorized);
// error handler for secure pair
securePair.on('error', function(err) {
if (secureEstablished) {
connection._handleNetworkError(err);
} else {
onSecure(err);
}
});
// "unpipe"

@@ -355,3 +379,6 @@ this._socket.removeAllListeners('data');

// secure established
securePair.on('secure', function() {
secureEstablished = true;
if (!rejectUnauthorized) {

@@ -373,2 +400,12 @@ onSecure();

});
// node.js 0.8 bug
securePair._cycle = securePair.cycle;
securePair.cycle = function cycle() {
if (this.ssl && this.ssl.error) {
this.error();
}
return this._cycle.apply(this, arguments);
};
};

@@ -375,0 +412,0 @@ }

3

lib/protocol/Parser.js

@@ -77,4 +77,3 @@ var MAX_PACKET_LENGTH = Math.pow(2, 24) - 1;

if (!err || typeof err.code !== 'string' || err.code.substr(0, 7) !== 'PARSER_') {
// Rethrow unknown errors
throw err;
throw err; // Rethrow non-MySQL errors
}

@@ -81,0 +80,0 @@

{
"name": "mysql",
"description": "A node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.",
"version": "2.10.1",
"version": "2.10.2",
"license": "MIT",

@@ -15,3 +15,3 @@ "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",

"dependencies": {
"bignumber.js": "2.1.2",
"bignumber.js": "2.1.4",
"readable-stream": "~1.1.13"

@@ -21,3 +21,3 @@ },

"eslint": "1.10.1",
"istanbul": "0.4.1",
"istanbul": "0.4.2",
"require-all": "2.0.0",

@@ -24,0 +24,0 @@ "rimraf": "2.2.8",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc