Skip to content

Fix SQLite URI connection string handling - #3289

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3220
Jun 5, 2026
Merged

Fix SQLite URI connection string handling#3289
Widthdom merged 2 commits into
mainfrom
fix-issue3220

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Route user-supplied SQLite database paths through SqliteConnectionStringBuilder for CLI db, diff, metadata reads, and DbContext read-only URI opens.
  • Keep ;Mode=...-style payloads inside the data source value instead of allowing them to become connection-string options.
  • Add regression coverage for semicolon payload parsing and missing-database creation prevention.

Validation

  • dotnet build
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~DbPathResolverTests|FullyQualifiedName~DbCommandRunnerTests"
  • dotnet test (net8 passed; net9 had one unrelated PostExtractionHookTests.CallbackBudgetExceeded_AddsDiagnosticAndSkipsTimedOutMutation failure, and the same test passed on targeted rerun)
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~PostExtractionHookTests.CallbackBudgetExceeded_AddsDiagnosticAndSkipsTimedOutMutation"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json

Documentation / Changelog

  • Added changelog.d/unreleased/3220.security.md.
  • No documentation update beyond the changelog fragment: this is a security hardening of existing SQLite URI handling, not a CLI contract change.

Review

Adversarial review: No blocking/actionable issues found.

Follow-up Candidates

None.

Fixes #3220

@Widthdom
Widthdom marked this pull request as ready for review June 5, 2026 04:16
@Widthdom
Widthdom merged commit 4c60456 into main Jun 5, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3220 branch June 5, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User-supplied SQLite file URIs should not be concatenated into raw connection strings

1 participant