diff options
author | David Storch <david.storch@10gen.com> | 2015-12-14 18:22:01 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-12-22 10:13:40 -0500 |
commit | 26bcf4ddd7e86885448e981f86aaf51fba0e2539 (patch) | |
tree | 5d9cd1de1193f8c52f8d1eae3dd3e35a3bffd3f0 /src/mongo/db/query/index_bounds_builder_test.cpp | |
parent | 3663e004dfc2f73b82b3d88b5fa1ac6b7dcd1d33 (diff) | |
download | mongo-26bcf4ddd7e86885448e981f86aaf51fba0e2539.tar.gz |
SERVER-21407 explicitly disallow $text/$where extensions during MatchExpression parsing
Diffstat (limited to 'src/mongo/db/query/index_bounds_builder_test.cpp')
-rw-r--r-- | src/mongo/db/query/index_bounds_builder_test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/query/index_bounds_builder_test.cpp b/src/mongo/db/query/index_bounds_builder_test.cpp index 3085d5c00b4..43a318523de 100644 --- a/src/mongo/db/query/index_bounds_builder_test.cpp +++ b/src/mongo/db/query/index_bounds_builder_test.cpp @@ -36,6 +36,7 @@ #include <memory> #include "mongo/db/json.h" #include "mongo/db/matcher/expression_parser.h" +#include "mongo/db/matcher/extensions_callback_disallow_extensions.h" #include "mongo/unittest/unittest.h" using namespace mongo; @@ -57,7 +58,8 @@ double NaN = numeric_limits<double>::quiet_NaN(); * Utility function to create MatchExpression */ MatchExpression* parseMatchExpression(const BSONObj& obj) { - StatusWithMatchExpression status = MatchExpressionParser::parse(obj); + StatusWithMatchExpression status = + MatchExpressionParser::parse(obj, ExtensionsCallbackDisallowExtensions()); ASSERT_TRUE(status.isOK()); MatchExpression* expr(status.getValue().release()); return expr; |