-
Type:
Spec Change
-
Resolution: Duplicate
-
Priority:
Unknown
-
None
-
Component/s: Handshake
-
None
-
Needed
Summary
The handshake spec requires that all strings provided as part of the driver info MUST NOT contain the delimiter used for metadata concatenation, and that drivers MUST throw an error if any of these strings contains that character. There are currently no tests for this requirement. For example, in the Go driver the following test will fail:
func TestMGC_Client_SetDriverInfoWithDelimeter(t *testing.T) {
opts := options.Client().SetDriverInfo(&options.DriverInfo{
Name: "has|pipe",
Version: "1|2",
Platform: "p|q",
})
client, err := mongo.Connect(opts)
defer func() { _ = client.Disconnect(context.Background()) }()
require.Error(t, err)
}
Motivation
Who is the affected end user?
MongoDB analytics
How does this affect the end user?
No affect on end user
How likely is it that this problem or use case will occur?
Unclear
If the problem does occur, what are the consequences and how severe are they?
Incorrect telemetry results with no way for the analytics team to discard
Is this issue urgent?
No
Is this ticket required by a downstream team?
No
Is this ticket only for tests?
Yes
Acceptance Criteria
Create a test that asserts an error when name, version, or platform contains the delimiter.
- is testing
-
GODRIVER-4099 Reject the metadata delimiter in DriverInfo strings
-
- Closed
-