
OPERATIONAL DEFECT DATABASE
...

...
It should be possible to access a database with characters in it's name that are forbidden in windows - when using a windows shell to access a linux server.
tad commented on Thu, 11 Apr 2013 16:45:03 +0000: I verified that this is a problem. The JavaScript "DB" constructor calls validDBName() to make sure that the name is valid, but this validates differently on Windows than it does on other platforms: static bool validDBName( const string& db ) { if ( db.size() == 0 || db.size() > 64 ) return false; #ifdef _WIN32 // We prohibit all FAT32-disallowed characters on Windows size_t good = strcspn( db.c_str() , "/\\. \"*:|?" ); #else // For non-Windows platforms we are much more lenient size_t good = strcspn( db.c_str() , "/\\. \"" ); #endif return good == db.size(); } This is the wrong thing to do whenever a Windows client is connected to a non-Windows server or a non-Windows client is connected to a Windows server. A Windows client will incorrectly reject database names that are valid on the non-Windows server, and a non-Windows client will permit database names that will potentially cause problems on the Windows server. The DB constructor (db_constructor() in src/mongo/scripting/sm_db.cpp line 765 for SpiderMonkey, or dbInit() in src/mongo/scripting/v8_db.cpp line 388 for V8) should apply rules based on the type of the server on which it will create the database. hmorch commented on Wed, 10 Apr 2013 12:46:41 +0000: We are using a prefix to distinguish between dbs of different type or environment. This prefix is separated by a colon ':' e.g. dev:mytests, tst:nightlyTests. That works on Linux but not on Windows. Also we may have hashes '#' in the name. I'm not sure if this would work on Windows. On Linux it does. tad commented on Wed, 10 Apr 2013 11:43:12 +0000: Can you give some examples of database names that are being rejected by the shell? These are rejected by a Windows shell but accepted by a Linux shell?
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.