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

SqlConnectionStringBuilder should also be updated to match the default value changes in 4.0.0-preview1 #1248

Closed
yyjdelete opened this issue Sep 2, 2021 · 1 comment · Fixed by #1265
Assignees
Labels
🐛 Bug! Something isn't right !

Comments

@yyjdelete
Copy link
Contributor

yyjdelete commented Sep 2, 2021

Describe the bug

4.0.0-preview1 include an broken change update the default value of Encrypt to true in #1210
https://github.com/dotnet/SqlClient/blob/main/release-notes/4.0/4.0.0-preview1.md#encrypt-default-value-set-to-true

But it didn't update SqlConnectionStringBuilder, which lead to confuse when parse an connStr with SqlConnectionStringBuilder(The value from SqlConnectionStringBuilder don't match what's really used by connection)

Expected behavior

  1. new SqlConnectionStringBuilder("").Encrypt should be true(parse from an connStr without Encrypt set)
  2. No idea what new SqlConnectionStringBuilder().Encrypt should be, but at least after fixed case 1, it shouldn't broken roundtrip
    Assert(new SqlConnectionStringBuilder().Encrypt == new SqlConnectionStringBuilder(new SqlConnectionStringBuilder().ToString()).Encrypt)

Further technical details

Microsoft.Data.SqlClient version: 4.0.0-preview1.21237.2

@DavoudEshtehari
Copy link
Member

Thanks @yyjdelete, We'll fix it.

@DavoudEshtehari DavoudEshtehari added the 🐛 Bug! Something isn't right ! label Sep 2, 2021
@DavoudEshtehari DavoudEshtehari linked a pull request Sep 15, 2021 that will close this issue
@cheenamalhotra cheenamalhotra added this to To do in SqlClient v4.0 via automation Sep 30, 2021
@cheenamalhotra cheenamalhotra moved this from To do to Review in progress in SqlClient v4.0 Sep 30, 2021
SqlClient v4.0 automation moved this from Review in progress to Done Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug! Something isn't right !
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants