diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-05-01 11:35:21 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-05-05 11:34:30 -0400 |
commit | ea6788f9c835a2bc9fd33a17fb12d5aef3b4b7f1 (patch) | |
tree | 0cbc1c0e87ecb04d2362d7d75a3dca6b1aa5ca6a | |
parent | 8a4b235971a59e92e3fa67fd6a92ddcfcd76ce81 (diff) | |
download | mongo-ea6788f9c835a2bc9fd33a17fb12d5aef3b4b7f1.tar.gz |
SERVER-29022 Check type of $db in OpMsgRequest
-rw-r--r-- | src/mongo/rpc/op_msg_rpc_impls.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/rpc/op_msg_rpc_impls.h b/src/mongo/rpc/op_msg_rpc_impls.h index f99d8b0f93c..48c08ba372a 100644 --- a/src/mongo/rpc/op_msg_rpc_impls.h +++ b/src/mongo/rpc/op_msg_rpc_impls.h @@ -91,7 +91,7 @@ public: explicit OpMsgRequest(OpMsg msg) : _msg(std::move(msg)) {} StringData getDatabase() const override { if (auto db = _msg.body["$db"]) { - return db.valueStringData(); + return db.checkAndGetStringData(); } return "admin"; } |