Skip to content

bug(connections): URL parser treats sslmode=prefer as valid, but driver rejects it at connect time #249

Description

@ZhuchkaTriplesix

The connection URL parser in lib/features/connections/connection_url_parser.dart sets useSSL = true when sslmode is prefer, but the postgres package throws ArgumentError for sslmode=prefer at connect time.

Impact: A user can save a postgresql://...?sslmode=prefer URL via the UI and only discover it fails when they actually try to connect.

Expected: Reject prefer (or any unsupported sslmode value) at parse time, or at minimum do not mark it as SSL-enabled.

Related: test/core/database/postgres_connection_string_parse_test.dart already documents the driver behavior.

Acceptance criteria:

  • parseConnectionUrlInput returns an error for sslmode=prefer on PostgreSQL URLs.
  • Add unit tests covering prefer, allow, and other unsupported modes.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions