mongodb-js / compass

The GUI for MongoDB.
https://mongodb.com/compass
Other
1.15k stars 176 forks source link

Adding new collection name with dot at the end creates new collection. #1992

Closed szygendaborys closed 2 years ago

szygendaborys commented 4 years ago

Creating a new collection with the dot (".") at the end of the collection name returns an error, but also creates a collection with the dot included. Additionally, you can neither remove or enter into this collection.

Bug Report

Current Behavior

I have clicked a "+" in Mongo Compass in order to create a collection named "absences". By mistake I wrote "absences." and clicked "Create". An error was returned, but collection has been created anyway.

Code/Gist

Expected Behavior/Code

Application should not create wrongly spelled collection.

Environment

Possible Solution

Check error handling.

Additional Context/Screenshots

Anemy commented 2 years ago

Hi @szygendaborys - thanks for reporting, and sorry for the late reply on this. If you update to the newest version of Compass (1.29.5 at the time of writing) this issue has been fixed. Thanks for using Compass and helping improve it!