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

Connection string with unescaped characters doesn't error on connect

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 1.32.5
    • Affects Version/s: None
    • Component/s: Connectivity
    • None
    • 3
    • Iteration Barnacle, Iteration Cuttlefish, Iteration Dolphin
    • Not Needed

      A connection string with an unescaped character in the password or appName (and probably other params) can be successfully saved and connected to, however it fails to load.

      We should error when connecting with or saving a connection string that contains invalid characters as we want users to escape these characters.

      It looks like this only happens when the connection has authentication, without authentication I receive the expected error. `Password contains unescaped characters`

      The loading error from the logs:

      {"t":{"$date":"2022-04-18T17:26:54.019Z"},"s":"E","c":"COMPASS-DATA-SERVICE","id":1001000102,"ctx":"Connection Storage","msg":"Failed to load connection, error while converting from model","attr":{"message":"Username contains unescaped characters sofloo@sofloo.mongo.cosmos.azure.com"}}
      

      The default connection string that Cosmos DB supplies contains unescaped characters in the `password` and `appName` so those users are probably going to be running into this issue more. Initial github issue: https://github.com/mongodb-js/compass/issues/2994

            Assignee:
            Unassigned Unassigned
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: