Repository navigation
Conversation
A connection string with an empty Encrypt value, for example `Server=h;Encrypt=;Database=d`, set `options.encrypt` to false. A connection string without Encrypt leaves `options.encrypt` unset, so tedious uses its default and encrypts. An empty value now gives the same result as a left-out key. @tediousjs/connection-string 1.1.2 gives the schema default for an empty boolean value. The encrypt override in NODE_MSSQL_SCHEMA has no default, so an empty value gives undefined, and the parser sets `options.encrypt` only when the value is a boolean. Explicit values do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 12.7.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does:
A connection string with an empty
Encryptvalue, for exampleServer=h;Encrypt=;Database=d, turned encryption off with tedious. A connection string that leavesEncryptout turns it on, because tedious defaults toencrypt: true. An empty value is malformed, but node-mssql now handles it the same as a left-out key.This change needs
@tediousjs/connection-string1.1.2 or later. That release gives the schema default for an empty boolean or number value, and keeps the key in thetoSchema()result. node-mssql now overridesencryptin its schema with no default, so an empty value givesundefined. The parser setsoptions.encryptonly when the value is a boolean.encryptEncryptEncryptleft outtrue(no change)No(no change)Encrypt=orEncrypt={ }true(wasfalse)No(no change)Encrypt=trueorEncrypt=yestrue(no change)Yes(no change)Encrypt=falseorEncrypt=nofalse(no change)No(no change)The new unit tests cover each row, and check that the pair after an empty
Encryptstill parses. The empty-value tests fail before the fix and pass after it. Lint and all 296 unit tests pass. No live SQL Server integration tests were run.Related issues:
Pre/Post merge checklist:
🤖 Generated with Claude Code