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

Compass should trim whitespace from replica set name on connection window, including from URI in clipboard

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.14.0
    • Affects Version/s: 1.12.5
    • Component/s: Compass, Connectivity
    • None
    • Sprint Ol' Dirty Bastard

      If a connection URI (non-SRV) from the clipboard has a whitespace at the end of the replica set name, it will be included by the connection dialog and cause the connection to fail with.

      > no secondary found in replicaset or invalid replica set name

      If I prepend whitespace to the Hostname in the URI, the connection fails with:

      > No hostname or hostnames provided in connection string

      However, it is not obvious there is whitespace prepended in the UI.

      Since copy/paste sometimes appends/prepends whitespace, we should consider trimming it from the beginning and end of all input strings on the connection dialog.

      Initially reported by Sam Weaver

      > Scenario: when I have a URI in my paste buffer, Compass detected the URI and populated the fields in the connect window. I had a trailing white space at the end of the replica set name that got carried over into the connect window. Not realizing my RS name now had a trailing space in it, I hit connect and got an error that the isMaster response did not match the provided set name.

      https://app.intercom.io/a/apps/p57suhg7/inbox/inbox/unassigned/conversations/15584449307

        1. screenshot-2.png
          174 kB
          Brian Blevins
        2. screenshot-1.png
          160 kB
          Brian Blevins

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            brian.blevins@mongodb.com Brian Blevins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: