Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
-
-
Repl 2017-05-08
-
0
Description
It is possible that the user's request specifies a type other than a string as the $db parameter, so checking the type is necessary to avoid performing an invalid memory access when using the returned StringData later on.
class OpMsgRequest final : public rpc::RequestInterface { |
public: |
explicit OpMsgRequest(OpMsg msg) : _msg(std::move(msg)) {} |
StringData getDatabase() const override { |
if (auto db = _msg.body["$db"]) { |
return db.valueStringData(); |
}
|
return "admin"; |
}
|
Attachments
Issue Links
- is related to
-
SERVER-28508 Egress and mongod ingress network layers are able to speak basic OP_MSG
-
- Closed
-