diff --git a/src/internal-plugins/database-ddl/lib/store/create-database-store.js b/src/internal-plugins/database-ddl/lib/store/create-database-store.js index 6a88f11bd93..619a060c9cf 100644 --- a/src/internal-plugins/database-ddl/lib/store/create-database-store.js +++ b/src/internal-plugins/database-ddl/lib/store/create-database-store.js @@ -31,6 +31,9 @@ const CreateDatabaseStore = Reflux.createStore({ * @param {Number} size - The max size of the capped collection. */ createDatabase(dbName, collection, capped, size) { + if (dbName.includes('.')) { + return this.handleResult(new Error('Database names may not contain a "."'), null); + } const options = capped ? { capped: true, size: parseInt(size, 10) } : {}; try { this.dataService.createCollection(`${dbName}.${collection}`, options, this.handleResult.bind(this));