Skip to content

Commit

Permalink
🐛 quote sqlv8 values
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Mar 20, 2023
1 parent a551621 commit a14f06f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
v9.1.1 (2023-01-??)
v9.1.2 (2023-??-??)
-------------------
[fix] Escape values that are added to the msnodesqlv8 connection string that we construct ((#1479)[https://github.com/tediousjs/node-mssql/pull/1479])

v9.1.1 (2023-01-18)
-------------------
[revert] Add support for AAD authentication via connection string ((#1436)[https://github.com/tediousjs/node-mssql/pull/1436])

Expand Down
3 changes: 2 additions & 1 deletion lib/msnodesqlv8/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class ConnectionPool extends BaseConnectionPool {
case 'encrypt':
return this.config.options.encrypt ? 'Yes' : 'No'
default:
return this.config[key] != null ? this.config[key] : ''
// quote values in `{}` and escape any existing `}` chars
return `{${this.config[key] ? this.config[key].toString().replace(/}/g, '}}') : ''}}`
}
})

Expand Down

0 comments on commit a14f06f

Please sign in to comment.