Skip to content

fix(connections): validate PostgreSQL sslmode and map useSSL correctly - #261

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/249-253-254-257-url-parser-ssl-fixes
Jul 10, 2026
Merged

fix(connections): validate PostgreSQL sslmode and map useSSL correctly#261
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/249-253-254-257-url-parser-ssl-fixes

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #249
Closes #253
Closes #254
Closes #257
Closes #258

Summary

Tighten PostgreSQL connection URL parsing so invalid sslmode values are rejected at input time, supported values are mapped to the correct useSSL flag, and omitted ports fall back to driver defaults.

Changes

  • Reject unsupported sslmode values for PostgreSQL (prefer, invalid, etc.) in parseConnectionUrlInput.
  • Map disableuseSSL=false; require, verify-ca, verify-fulluseSSL=true.
  • Only store an explicit URI port; rely on driver defaults when the port is omitted.
  • Show host:port in the display name when no database is present.
  • Update and expand unit tests.

Test plan

  • flutter test test/features/connections/connection_url_parser_test.dart (20 tests, all passing).

#249, #253, #254, #257, #258)

- Reject unsupported sslmode values (e.g. prefer, invalid) for PostgreSQL.
- Map disable → useSSL=false; require, verify-ca, verify-full → useSSL=true.
- Only store an explicit URI port; fall back to driver defaults when omitted.
- Keep host:port in display name when no database is present.
@github-actions github-actions Bot added the bug Something isn't working label Jul 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 56512c2 into dev Jul 10, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/249-253-254-257-url-parser-ssl-fixes branch July 26, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant