Preserve connection string values containing equals signs#177
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesConnection string parser fix and tests
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
ParseConnectionString split each pair on every '=' and kept only the second segment, truncating any Data Source value that contains '=' at the first one. Split on the first '=' only. Also assign via the dictionary indexer (last value wins) instead of Add, so a repeated key no longer throws.
814b6f7 to
54060b4
Compare
|



Summary
ConnectionStringParser.ParseConnectionStringsplit eachkey=valuepair on every=and kept onlykeyValue[1]. AData Sourcewhose value contains=(a file path, or aFullUriwith query parameters) was truncated at the first=. A repeated key also threw because the dictionary was populated withAdd.Changes
=only (Split(separator, 2, StringSplitOptions.None)), preserving the rest of the value. Available on net40/net45/netstandard2.1.Add, so a repeated key does not throw.Tests
Added
ConnectionStringParserTestcases for aData Sourcevalue containing=and for a repeated key. Full suite green (49 tests).