summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-12-14 18:22:01 -0500
committerDavid Storch <david.storch@10gen.com>2015-12-22 10:13:40 -0500
commit26bcf4ddd7e86885448e981f86aaf51fba0e2539 (patch)
tree5d9cd1de1193f8c52f8d1eae3dd3e35a3bffd3f0 /src/mongo/db/ttl.cpp
parent3663e004dfc2f73b82b3d88b5fa1ac6b7dcd1d33 (diff)
downloadmongo-26bcf4ddd7e86885448e981f86aaf51fba0e2539.tar.gz
SERVER-21407 explicitly disallow $text/$where extensions during MatchExpression parsing
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index e54bc1838e2..9ee42d649a6 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -50,6 +50,7 @@
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/db/ops/insert.h"
+#include "mongo/db/matcher/extensions_callback_disallow_extensions.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/repl/replication_coordinator_global.h"
@@ -287,7 +288,8 @@ private:
const char* keyFieldName = key.firstElement().fieldName();
BSONObj query =
BSON(keyFieldName << BSON("$gte" << kDawnOfTime << "$lte" << expirationTime));
- auto canonicalQuery = CanonicalQuery::canonicalize(nss, query);
+ auto canonicalQuery =
+ CanonicalQuery::canonicalize(nss, query, ExtensionsCallbackDisallowExtensions());
invariantOK(canonicalQuery.getStatus());
DeleteStageParams params;