Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4901

Compass overwrites appname field in connection string

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.28.4
    • 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.

            Assignee:
            sergey.petushkov@mongodb.com Sergey Petushkov
            Reporter:
            nabil.boutemeur@gmail.com Nabil Boutemeur
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: