diff options
author | Qingyang Chen <qingyang.chen@10gen.com> | 2015-08-13 17:59:12 -0400 |
---|---|---|
committer | Qingyang Chen <qingyang.chen@10gen.com> | 2015-08-14 11:00:34 -0400 |
commit | 98602129aecfa6b23f084b0a565a323ad82207e6 (patch) | |
tree | adaacca422bff6cc6856abb71c110a49ecab51d5 /jstests/noPassthroughWithMongod/find_cmd.js | |
parent | a93377f3e4eca801b3bdc89edb44399ab0e326f1 (diff) | |
download | mongo-98602129aecfa6b23f084b0a565a323ad82207e6.tar.gz |
SERVER-19928 Find command should reject requests to read special command namespaces
Diffstat (limited to 'jstests/noPassthroughWithMongod/find_cmd.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/find_cmd.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/noPassthroughWithMongod/find_cmd.js b/jstests/noPassthroughWithMongod/find_cmd.js index 00e4d315791..31d3311832c 100644 --- a/jstests/noPassthroughWithMongod/find_cmd.js +++ b/jstests/noPassthroughWithMongod/find_cmd.js @@ -47,3 +47,7 @@ assert.commandFailed(coll.runCommand("find", {foo: "bar"})); // Filter doesn't parse. assert.commandFailed(coll.runCommand("find", {projection: {_id: 0}, filter: {$foo: "bar"}})); + +// Special command namespace. +assert.commandFailed(coll.getDB().runCommand({find: "$cmd"})); +assert.commandFailed(coll.getDB().runCommand({find: "$cmd.sys.inprog"}));
\ No newline at end of file |