Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mssql trustServerCertificate option. #4500

Merged
merged 1 commit into from Jul 20, 2021
Merged

Conversation

mrdnote
Copy link
Contributor

@mrdnote mrdnote commented May 25, 2021

No description provided.

@Miladiir
Copy link

Miladiir commented Jul 6, 2021

Can this PR be reviewed please? CI failed because of some other reason. We want to use these missing types instead of supplying them ourselves.

@@ -62,6 +62,7 @@ class Client_MSSQL extends Client {
useColumnNames: false,
tdsVersion: settings.options.tdsVersion || '7_4',
appName: settings.options.appName || 'knex',
trustServerCertificate: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove the default value? Considering that it might silently change behaviour of currently running applications, that would be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably false default is fine here? I mean if that option has not been given earlier it couldn't have been true.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked mssql documentation and you are right, false is the default

@kibertoad kibertoad closed this Jul 20, 2021
@kibertoad kibertoad reopened this Jul 20, 2021
@kibertoad kibertoad merged commit 8619d80 into knex:master Jul 20, 2021
@kibertoad
Copy link
Collaborator

Released in 0.95.8

@jcwatson11
Copy link

This is a good bugfix, and greatly appreciated for those of us using docker containers based on the default mssql linux image for development purposes, which comes with a self-signed certificate. However, this fix is not immediately available to users of Objection.js because Objection.js requires knex@<0.95.0, which would exclude this bugfix.

Under normal circumstances I could check out whatever major version Objection.js is tied to and create a bugfix PR for that stream. However, I'm not really sure where to start because there appears to be a rather large gap in the tagging between the 0.21.x stream, and the 0.95.x stream. I'm not sure what the reasoning is here as you are using what looks like a sematic versioned number, but not really using it semantically (see semver.org).

I did not readily find contribution guidelines in the github.come readme page... so...

If I were to try to create a PR that back-ports a change like this to a version number that Objection.js and other libraries could use, how would I go about that?

@jcwatson11
Copy link

I hope I did this properly. Here's my PR for the 0.21 stream.

@kibertoad
Copy link
Collaborator

Note that 3.0.0-alpha.4 supports latest knex. That said, I'll review your PR and if it's not too disrupting, will be happy to merge!

@jcwatson11
Copy link

Thanks for the tip! Our company development policies require stable releases to develop against. So unfortunately 3.0.0-alpha.4 is not an option for us. Thanks for considering my PR! :)

@jcwatson11
Copy link

I saw that my PR was merged and released in 0.21.20. Thank you!

@kibertoad
Copy link
Collaborator

np, thank you for your contribution!

OlivierCavadenti pushed a commit to AbeonaPascha/knex that referenced this pull request Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants