-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Component/s: Connection String
-
None
-
Needed
-
(copied to CRM)
Summary
The Connection String spec states here that: The key is everything up to the first equals sign ("=") and the value is everything afterwards. However, there is no test to verify that equal sign terminated keys with no value are successfully parsed. There is a test here that confirms non-equals terminated strings are errored on.
The ask
- Implement a test to confirm that equals terminated keys with no value are parsed without error.
- Consider permitting drivers to disallow empty values in a major version
- Permitting empty values have risk of being silently accepted when the intention was to pass something (ex. environment variables left undefined are empty strings).
- If there is a desire for a way to configure "nothing" as a value an indicator of some kind should be considered as it is a clear choice of omission.
Motivation
Who is the affected end user?
- At least C# and the Node.js driver have confirmed divergence where they do not accept empty values for keys.
- Users wanting to specify an empty value for a readPreferenceTags: NODE-4354
How does this affect the end user?
- The shared connection string documentation mentions support for this behavior
How likely is it that this problem or use case will occur?
- Could be frequent depending on the usage of connection string. Node.js has maintained this behavior since at least July of 2021.
If the problem does occur, what are the consequences and how severe are they?
- On drivers that don't permit empty values you get an error at start up so an early warning that would prevent you from proceeding.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
n/a
Is this ticket only for tests?
- No.
- is depended on by
-
NODE-4354 Unable to specify empty readPreferenceTags in a connection string
- Blocked
- split to
-
CDRIVER-4424 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
CSHARP-4249 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
CXX-2542 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
GODRIVER-2486 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
JAVA-4675 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
NODE-4403 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
PHPLIB-908 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
PYTHON-3350 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
RUBY-3048 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
RUST-1404 Connection String spec requires equals sign after keys to permit empty input values
- Blocked
-
MOTOR-991 Connection String spec requires equals sign after keys to permit empty input values
- Closed