Skip to content

fix(connections): URL import rejects unescaped passwords without a hint, mangles Windows SQLite paths, and unbrackets IPv6 #1315

Closed

Description

@ZhuchkaTriplesix

Problem

lib/features/connections/connection_url_parser.dart:

  1. Unescaped specials. postgres://user:p@ss@host/db, ...:p#ss@... and mysql://root:pa/ss@host/db make Uri.tryParse return null, so the user gets only Invalid URL/URI format. (checked with dart run). The cause is common (a raw password from a cloud console) and the message says nothing about percent-encoding.
  2. Windows SQLite. sqlite:///C:/data/app.db gives the path /C:/data/app.db (uri.path), which does not exist on Windows.
  3. IPv6. uri.host is ::1 without brackets; building a URI from the host later (Mongo buildConnectionUri, the default name) yields an invalid string.

Scope

  • When parsing fails and the text has an @ after a : in the authority, retry with the userinfo percent-encoded, or say special characters in the password must be percent-encoded (@ is %40).
  • Strip the leading slash of a /X:/... drive path on Windows.
  • Re-bracket IPv6 hosts where a URI is built.
  • Tests for each.

Acceptance

  • A URL with a raw @ or # in the password imports, or fails with the encoding hint.
  • sqlite:///C:/x.db opens C:/x.db on Windows.
  • An IPv6 host round-trips.

Activity

  1. added
    bugSomething isn't working
    parserTheme parser epic label: parser
    connectionsDatabase connections, URI parsing, pools
    P3Low priority / Polish & Enhancements
    on Oct 10, 2026
  2. ZhuchkaTriplesix commented on Oct 10, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Сделано в #1329, смержено в dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Low priority / Polish & EnhancementsbugSomething isn't workingconnectionsDatabase connections, URI parsing, poolsparserTheme parser epic label: parser

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions