-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 1.26.1
-
Component/s: Connectivity
-
None
-
1
-
Iteration Firenze, Iteration Geneva
-
Not Needed
Problem Statement/Rationale
Compass overwrites the appName field in connection string even when explicitly specified.
Steps to Reproduce
- Open Compass
- Connect to an instance with a connection string (doesn't need to specify) with or without an appname field
- Disconnect to check the settings that were actually used
- Note "&appname=MongoDB%20Compass" appears in the connection string, even if that field was specified with another value
Expected Results
I expect appname to keep its explicitly set value.
Actual Results
The appname field is added when omited, or overwritten with a value of "MongoDB%20Compass"
Additional Notes
Issue seems to come from https://github.com/mongodb-js/compass/blob/fe5fc2925a2621b2a69c9dc835de68da1a393be5/packages/compass/src/app/migrations/legacy-connection.js#L686
I suggest either removing these lines, or using the default value only if it wasn't specified explicitly in the connection string.