summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/op_msg_rpc_impls.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-05-01 11:35:21 -0400
committerMathias Stearn <mathias@10gen.com>2017-05-05 11:34:30 -0400
commitea6788f9c835a2bc9fd33a17fb12d5aef3b4b7f1 (patch)
tree0cbc1c0e87ecb04d2362d7d75a3dca6b1aa5ca6a /src/mongo/rpc/op_msg_rpc_impls.h
parent8a4b235971a59e92e3fa67fd6a92ddcfcd76ce81 (diff)
downloadmongo-ea6788f9c835a2bc9fd33a17fb12d5aef3b4b7f1.tar.gz
SERVER-29022 Check type of $db in OpMsgRequest
Diffstat (limited to 'src/mongo/rpc/op_msg_rpc_impls.h')
-rw-r--r--src/mongo/rpc/op_msg_rpc_impls.h2
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";
}