[COMPASS-2844] Password special character escaping for SRV record connections not as robust as hostname connections Created: 10/May/18  Updated: 29/Oct/23  Resolved: 27/Nov/18

Status: Closed
Project: Compass
Component/s: Connectivity
Affects Version/s: 1.13.0
Fix Version/s: 1.16.2, 1.16.3

Type: Bug Priority: Critical - P2
Reporter: Brian Blevins Assignee: Durran Jordan
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to COMPASS-2674 Naive handling of "@" in password pre... Closed
is related to COMPASS-2798 Fail to login when the password ends ... Closed
Sprint: Iteration Mango Miso, Iteration Naan, Iteration Octopus, Iteration Paneer, Iteration Qbert, Iteration Sriracha

 Description   

Using a special character, such as `<`, causes an error with SRV record connection attempts, but not with hostname connection attempts.

Password contains an illegal unescaped character

The password given in the screenshot is: a<b

The same password given with a hostname record correctly gives authentication failed.

 

Acceptance Criteria:

  • Compass connections using SRV records properly escape special characters in the password.
  • Compass connections using SRV records properly escape special characters in the username.
  • Supported special characters include: "@", "/", "\", "?", "#", "+", "_", "!", "-", "'"

 

 



 Comments   
Comment by Jason R. Coombs [ 16/Dec/18 ]

Confirmed this does fix the issue for me. Thanks!

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: master
https://github.com/10gen/compass/commit/5cec32d64756c743caf13c966de948a3649b5640

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: 1.16-releases
https://github.com/10gen/compass/commit/b66fb9a36020beb3e4877d6c43e8d82aee83f53d

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: 1.17-releases
https://github.com/10gen/compass/commit/206272f054caf8d0fd3f95e86948e1ebac987902

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: COMPASS-2844
https://github.com/10gen/compass/commit/475ee4f39a578389af28444f16a374d13303c995

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: master
https://github.com/mongodb-js/data-service/commit/a4f93155fc13e907db8194724693c6d2dcb6e3b1

Comment by Githook User [ 27/Nov/18 ]

Author:

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

Message: COMPASS-2844: Don't validate URI twice
Branch: master
https://github.com/mongodb-js/connection-model/commit/3e971145950a46ae8b0e19a8af64a861a326b3d2

Comment by Jason R. Coombs [ 18/Jul/18 ]

Workaround is to use the legacy form of replica set discovery (tell Atlas you're running Compass 1.11).

Comment by Jason R. Coombs [ 18/Jul/18 ]

Other "illegal" characters includes at least one of the following: _!'-\

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