[COMPASS-2725] Compass should trim whitespace from replica set name on connection window, including from URI in clipboard Created: 05/Apr/18  Updated: 22/Mar/19  Resolved: 11/Apr/18

Status: Closed
Project: Compass
Component/s: Compass, Connectivity
Affects Version/s: 1.12.5
Fix Version/s: 1.14.0

Type: Bug Priority: Major - P3
Reporter: Brian Blevins Assignee: Durran Jordan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File screenshot-1.png     PNG File screenshot-2.png    
Issue Links:
Related
related to COMPASS-3538 Compass should trim whitespace from t... Closed
Sprint: Sprint Ol' Dirty Bastard

 Description   

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



 Comments   
Comment by Githook User [ 13/Apr/18 ]

Author:

{'email': 'durran@gmail.com', 'name': 'Durran Jordan', 'username': 'durran'}

Message: COMPASS-2725: Trimming whitespace in connect
Branch: master
https://github.com/10gen/compass/commit/a7c65a550b63d3cd952a5a9e4512fb6b5d5d59cb

Comment by Githook User [ 11/Apr/18 ]

Author:

{'email': 'durran@gmail.com', 'name': 'Durran Jordan', 'username': 'durran'}

Message: COMPASS-2725: Trimming whitespace in connect
Branch: COMPASS-2725
https://github.com/10gen/compass/commit/9c49230a90f86111729d7b6c7a4b6820d16afb92

Generated at Wed Feb 07 22:30:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.