You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

mysql2

Package Overview
Dependencies
Maintainers
3
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.9.7 to 3.9.8

5

lib/auth_plugins/caching_sha2_password.js

@@ -39,3 +39,6 @@ 'use strict';

);
return crypto.publicEncrypt(key, stage1);
return crypto.publicEncrypt({
key,
padding: crypto.constants.RSA_PKCS1_OAEP_PADDING
}, stage1);
}

@@ -42,0 +45,0 @@

2

lib/auth_plugins/caching_sha2_password.md
##
https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html

@@ -5,0 +5,0 @@ ```js

@@ -76,1 +76,13 @@ 'use strict';

exports.privateObjectProps = privateObjectProps;
const fieldEscape = (field) => {
if (privateObjectProps.has(field)) {
throw new Error(
`The field name (${field}) can't be the same as an object's private property.`,
);
}
return srcEscape(field);
};
exports.fieldEscape = fieldEscape;

@@ -148,18 +148,10 @@ 'use strict';

for (let i = 0; i < fields.length; i++) {
fieldName = helpers.srcEscape(fields[i].name);
fieldName = helpers.fieldEscape(fields[i].name);
// parserFn(`// ${fieldName}: ${typeNames[fields[i].columnType]}`);
if (helpers.privateObjectProps.has(fields[i].name)) {
throw new Error(
`The field name (${fieldName}) can't be the same as an object's private property.`,
);
}
parserFn(`// ${fieldName}: ${typeNames[fields[i].columnType]}`);
if (typeof options.nestTables === 'string') {
lvalue = `result[${helpers.srcEscape(
fields[i].table + options.nestTables + fields[i].name,
)}]`;
lvalue = `result[${helpers.fieldEscape(fields[i].table + options.nestTables + fields[i].name)}]`;
} else if (options.nestTables === true) {
tableName = helpers.srcEscape(fields[i].table);
tableName = helpers.fieldEscape(fields[i].table);
parserFn(`if (!result[${tableName}]) result[${tableName}] = {};`);

@@ -194,3 +186,2 @@ lvalue = `result[${tableName}][${fieldName}]`;

currentFieldNullBit *= 2;

@@ -197,0 +188,0 @@ if (currentFieldNullBit === 0x100) {

@@ -146,3 +146,3 @@ 'use strict';

for (let i = 0; i < resultTablesArray.length; i++) {
parserFn(`result[${helpers.srcEscape(resultTablesArray[i])}] = {};`);
parserFn(`result[${helpers.fieldEscape(resultTablesArray[i])}] = {};`);
}

@@ -153,18 +153,14 @@ }

let fieldName = '';
let tableName = '';
for (let i = 0; i < fields.length; i++) {
fieldName = helpers.srcEscape(fields[i].name);
fieldName = helpers.fieldEscape(fields[i].name);
// parserFn(`// ${fieldName}: ${typeNames[fields[i].columnType]}`);
if (helpers.privateObjectProps.has(fields[i].name)) {
throw new Error(
`The field name (${fieldName}) can't be the same as an object's private property.`,
);
}
parserFn(`// ${fieldName}: ${typeNames[fields[i].columnType]}`);
if (typeof options.nestTables === 'string') {
lvalue = `result[${helpers.srcEscape(
fields[i].table + options.nestTables + fields[i].name,
)}]`;
lvalue = `result[${helpers.fieldEscape(fields[i].table + options.nestTables + fields[i].name)}]`;
} else if (options.nestTables === true) {
lvalue = `result[${helpers.srcEscape(fields[i].table)}][${fieldName}]`;
tableName = helpers.fieldEscape(fields[i].table);
parserFn(`if (!result[${tableName}]) result[${tableName}] = {};`);
lvalue = `result[${tableName}][${fieldName}]`;
} else if (options.rowsAsArray) {

@@ -171,0 +167,0 @@ lvalue = `result[${i.toString(10)}]`;

{
"name": "mysql2",
"version": "3.9.7",
"version": "3.9.8",
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",

@@ -9,3 +9,3 @@ "main": "index.js",

"lint": "npm run lint:docs && npm run lint:code",
"lint:code": "eslint index.js promise.js index.d.ts promise.d.ts \"typings/**/*.ts\" \"lib/**/*.js\" \"test/**/*.{js,ts}\" \"benchmarks/**/*.js\"",
"lint:code": "eslint index.js promise.js index.d.ts promise.d.ts \"typings/**/*.ts\" \"lib/**/*.js\" \"test/**/*.{js,cjs,mjs,ts}\" \"benchmarks/**/*.js\"",
"lint:docs": "eslint Contributing.md README.md",

@@ -81,3 +81,3 @@ "lint:typings": "npx prettier --check ./typings",

"eslint-plugin-async-await": "0.0.0",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-markdown": "^5.0.0",
"husky": "^9.0.2",

@@ -84,0 +84,0 @@ "lint-staged": "^15.0.1",

@@ -17,3 +17,3 @@ import { RsaPublicKey, RsaPrivateKey, KeyLike } from 'crypto';

serverPublicKey?: RsaPublicKey | RsaPrivateKey | KeyLike;
jonServerPublicKey?: (data: Buffer) => void;
onServerPublicKey?: (data: Buffer) => void;
}>;

@@ -29,4 +29,4 @@ mysql_clear_password: AuthPluginDefinition<{

serverPublicKey?: RsaPublicKey | RsaPrivateKey | KeyLike;
joinServerPublicKey?: (data: Buffer) => void;
onServerPublicKey?: (data: Buffer) => void;
}>;
};
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc