diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-08-22 14:49:31 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-09-02 15:10:30 -0400 |
commit | f288ea86db58c6aefe4807ed7ac1815577da2752 (patch) | |
tree | dadff64105fe94dfeef57c00a38c1e4ff960ca07 /src/mongo/db/dbmessage.cpp | |
parent | aa7411e6e2c4fd18bbff934c57567d89dc3efa0e (diff) | |
download | mongo-f288ea86db58c6aefe4807ed7ac1815577da2752.tar.gz |
SERVER-25159 Default BSON validation version should depend on admin.system.version
Diffstat (limited to 'src/mongo/db/dbmessage.cpp')
-rw-r--r-- | src/mongo/db/dbmessage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/dbmessage.cpp b/src/mongo/db/dbmessage.cpp index f16ec2b6276..4b5f5054ccf 100644 --- a/src/mongo/db/dbmessage.cpp +++ b/src/mongo/db/dbmessage.cpp @@ -125,7 +125,10 @@ BSONObj DbMessage::nextJsObj() { _nextjsobj != NULL && _theEnd - _nextjsobj >= 5); if (serverGlobalParams.objcheck) { - Status status = validateBSON(_nextjsobj, _theEnd - _nextjsobj); + // TODO SERVER-23972: Change BSONVersion::kLatest to + // Validator<BSONObj>::enabledBSONVersion() so that we disallow decimal inserts in legacy + // write mode if decimal is disabled. + Status status = validateBSON(_nextjsobj, _theEnd - _nextjsobj, BSONVersion::kLatest); massert(10307, str::stream() << "Client Error: bad object in message: " << status.reason(), status.isOK()); |