From ea6788f9c835a2bc9fd33a17fb12d5aef3b4b7f1 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Mon, 1 May 2017 11:35:21 -0400 Subject: SERVER-29022 Check type of $db in OpMsgRequest --- src/mongo/rpc/op_msg_rpc_impls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; } -- cgit v1.2.1