Skip to content

RUST-229 Connection string parser does not support IPv6 addresses #916

@aqrln

Description

@aqrln

Versions/Environment

[email protected], [email protected] and latest from git

Describe the bug

ServerAddress::parse simply splits the hostname and port by : character which doesn't work with IPv6 addresses, as it splits in the middle of the address and not after the ] character.

To Reproduce

  1. Try to connect with a connection string like mongodb://root:root@[::1]:27018/tests
  2. The driver returns the following error: port must be valid 16-bit unsigned integer, instead got:

Metadata

Metadata

Labels

tracked-in-jiraTicket filed in Mongo's Jira system

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions