Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mssql

Package Overview
Dependencies
Maintainers
4
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mssql - npm Package Compare versions

Comparing version 5.1.4 to 5.1.5

8

CHANGELOG.txt

@@ -0,1 +1,9 @@

v5.1.5 (2021-05-13)
-------------------
[fix] Bump various dependencies for security fixes
v5.1.4 (2021-01-01)
-------------------
[fix] Ensure line endings are unix style (LF)
v5.1.3 (2020-09-18)

@@ -2,0 +10,0 @@ -------------------

0

lib/cli.js

@@ -0,0 +0,0 @@ 'use strict'

@@ -0,0 +0,0 @@ 'use strict'

@@ -0,0 +0,0 @@ MIT License

6

package.json

@@ -24,3 +24,3 @@ {

],
"version": "5.1.4",
"version": "5.1.5",
"main": "index.js",

@@ -30,4 +30,4 @@ "repository": "github:tediousjs/node-mssql",

"dependencies": {
"debug": "^3.2.6",
"generic-pool": "^3.7.1",
"debug": "^3.2.7",
"generic-pool": "^3.7.2",
"tedious": "^4.2.0"

@@ -34,0 +34,0 @@ },

'use strict'
const mssql = require('./')
const { v4: uuid } = require('uuid')
const wtf = require('wtfnode');
const [, , max] = process.argv;
const sqlConfig = {
password: 'Upper_l0wercase',
database: 'di_production',
password: '&r8wrucH',
database: 'StockDB',
stream: false,
// driver: 'msnodesqlv8',
options: {
// trustedConnection: true,
trustServerCertificate: true,
// trustServerCertificate: true,
enableArithAbort: true,
encrypt: true,
// abortTransactionOnError: false,
abortTransactionOnError: false,
},
pool: {
max: max ? parseInt(max) : 10,
max: 1,
min: 0,
},
port: 1433,
user: 'sa',
server: 'localhost',
};
user: 'dhensby',
server: '4sa.database.windows.net',
}
(async () => {
const pools = await Promise.all(Array.from(new Array(100)).map(() => {
return new mssql.ConnectionPool(sqlConfig).connect()
}))
setInterval(async () => {
const pool = pools[Math.floor(Math.random() * pools.length)]
const ps = new mssql.PreparedStatement(pool)
ps.input('tempParam', mssql.TYPES.NVarChar)
await ps.prepare('SELECT TOP 10 * FROM [debug] WHERE [tempData] = @tempParam')
await ps.execute({ tempParam: '{}' })
await ps.unprepare()
}, 100)
})()
// Bad URI, connection timeouts, hangs process
mssql.connect({ ...sqlConfig, port: 2345 }).catch(err => {
console.error(err.message);
console.log('reconnecting...');
// Try to connect using the right URI
return mssql
.connect(sqlConfig)
.then(() => console.log('connected'))
.then(() => mssql.close())
.then(() => console.log('closed'))
.catch(err => {
console.error(err.message)
wtf.dump()
}); // <-- Fails here
});
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