diff options
author | Alya Berciu <alyacarina@gmail.com> | 2021-05-07 13:53:41 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-07 13:31:16 +0000 |
commit | 61765594369bd1592ac620074bebdc6e16444f3c (patch) | |
tree | bad81d2ed3222e29af269a290c32383df3f76c0b /src/mongo/db/ops | |
parent | b06cffeabf1d6152f3cf722efb07a144480d3917 (diff) | |
download | mongo-61765594369bd1592ac620074bebdc6e16444f3c.tar.gz |
SERVER-56743 Reintroduce validation for no $-prefixed fields in _id
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/insert.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp index a4ba00b6cbc..ffda67e33f8 100644 --- a/src/mongo/db/ops/insert.cpp +++ b/src/mongo/db/ops/insert.cpp @@ -132,8 +132,7 @@ StatusWith<BSONObj> fixDocumentForInsert(OperationContext* opCtx, const BSONObj& if (e.type() == Array) { return StatusWith<BSONObj>(ErrorCodes::BadValue, "can't use an array for _id"); } - if (!feature_flags::gFeatureFlagDotsAndDollars.isEnabledAndIgnoreFCV() && - e.type() == Object) { + if (e.type() == Object) { BSONObj o = e.Obj(); Status s = o.storageValidEmbedded(); if (!s.isOK()) |