diff options
author | Yoonsoo Kim <yoonsoo.kim@mongodb.com> | 2021-08-02 01:57:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-02 02:50:42 +0000 |
commit | b6f5fa2c56195844a543a5561ea336379c5b1f02 (patch) | |
tree | a2a925b7e4299ad9d057e0eaf29fdb5a014182f8 /src/mongo/db/commands/user_management_commands.cpp | |
parent | f0c88f12d3ce0331010251cc7b0f55cbc3a97e1d (diff) | |
download | mongo-b6f5fa2c56195844a543a5561ea336379c5b1f02.tar.gz |
SERVER-58338 Return an error if client attempts an OP_QUERY command other than isMaster/hello
Diffstat (limited to 'src/mongo/db/commands/user_management_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/user_management_commands.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 9c42dec4997..2157df890d4 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -891,8 +891,7 @@ private: auto svcCtx = _client->getServiceContext(); auto sep = svcCtx->getServiceEntryPoint(); auto opMsgRequest = OpMsgRequest::fromDBAndBody(kAdminDB, cmdBuilder->obj()); - auto requestMessage = rpc::messageFromOpMsgRequest( - rpc::supports::kAll, rpc::supports::kOpQueryOnly, opMsgRequest); + auto requestMessage = rpc::messageFromOpMsgRequest(rpc::Protocol::kOpMsg, opMsgRequest); // Switch to our local client and create a short-lived opCtx for this transaction op. AlternativeClientRegion clientRegion(_client); |