[JAVA-2540] Database name should be checked for validity in connection string Created: 15/Jun/17 Updated: 29/Oct/23 Resolved: 09/Jan/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Configuration |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Rathi Gnanasekaran | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Add check for database name validity against the following description, from the connection string specification, of disallowed characters:
Because ConnectionString will delegate to MongoNamespace#checkDatabaseNameValidity for this check, and MongoNamespace has to support namespace strings like "$external.$cmd", the Java driver will not prohibit the dollar sign character at this time. |
| Comments |
| Comment by Githook User [ 09/Jan/18 ] | ||||||||||||||||||
|
Author: {'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}Message: | ||||||||||||||||||
| Comment by Githook User [ 09/Jan/18 ] | ||||||||||||||||||
|
Author: {'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}Message:
| ||||||||||||||||||
| Comment by Jeffrey Yemin [ 26/Dec/17 ] | ||||||||||||||||||
|
The following tests from invalid-uris.json are failing:
The failure is because the database name ends up as something like @localhost/db, which the spec now disallows due to the presence of a "/" character. The tests should be fixed and enabled. |