Skip to content

fix: msdsn improvements for TrustServerCertificate and IPv6#312

Open
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql:fix/msdsn-improvements
Open

fix: msdsn improvements for TrustServerCertificate and IPv6#312
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql:fix/msdsn-improvements

Conversation

@dlevy-msft-sql
Copy link

Two independent fixes to the msdsn package:

Changes

1. TrustServerCertificate Field

Adds TrustServerCertificate boolean field to msdsn.Config struct, making this important connection parameter accessible to callers.

2. IPv6 URL Generation Fix

Fixes Config.URL() to properly bracket IPv6 addresses in generated URLs, preventing malformed URLs like sqlserver://user@::1:1433 (now correctly generates sqlserver://user@[::1]:1433).


Split from #306 for easier review

@dlevy-msft-sql dlevy-msft-sql self-assigned this Jan 31, 2026
@dlevy-msft-sql dlevy-msft-sql added bug Something isn't working Size: S Small issue (less than one week effort, less than 250 lines of code) Area - connections Issues affecting connection security or strings labels Jan 31, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR provides two independent improvements to the msdsn package: adding a TrustServerCertificate field to the Config struct and fixing IPv6 address formatting in generated URLs.

Changes:

  • Adds TrustServerCertificate boolean field to Config struct to expose this connection parameter to callers
  • Fixes Config.URL() to properly bracket IPv6 addresses when combined with ports (e.g., [::1]:1433 instead of ::1:1433)
  • Updates parseTLS function signature to return the trustServerCert value for storage in Config

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.59%. Comparing base (c16a19e) to head (2fcbb73).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   75.36%   78.59%   +3.23%     
==========================================
  Files          34       34              
  Lines        6597     6598       +1     
==========================================
+ Hits         4972     5186     +214     
+ Misses       1337     1134     -203     
+ Partials      288      278      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlevy-msft-sql dlevy-msft-sql added in-review Priority: 0 Breaking things; must fix immediately Priority: 1 High priority/impact and removed Priority: 0 Breaking things; must fix immediately labels Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - connections Issues affecting connection security or strings bug Something isn't working Priority: 1 High priority/impact Size: S Small issue (less than one week effort, less than 250 lines of code)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants