Skip to content

Go SDK: connection string accepts port 0 #5100

Backlog

Description

@ningmao-hlyz

The Go SDK parses iggy://iggy:secret@localhost:0 without an error, and the
client then fails later, on connect. ParseConnectionString in
foreign/go/client/connection_string.go only checks that the port fits in a
u16, and net.SplitHostPort accepts 0, so port 0 gets through.

Both other SDKs refuse it at parse time:

Reproduction on current master, from foreign/go:

go test ./client/ -run TestParseConnectionString_AcceptsPortZero -v

That test passes, so the bug is pinned by the suite. Its comment says Rust
and Node accept 0, but neither does.

Activity

  1. added
    bug
    go
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggo

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions