summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/object_check.cpp
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2017-03-06 13:16:52 -0500
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2017-03-06 13:16:52 -0500
commite2474a4d0d0fd1ba84d8edd201cf0c2334828c9e (patch)
tree2a154f2687a6e8035cae9fdbe5926baeb2dccd46 /src/mongo/rpc/object_check.cpp
parent3084639dfcd5516e77e5ca2e5909356ecf6c9cd4 (diff)
downloadmongo-e2474a4d0d0fd1ba84d8edd201cf0c2334828c9e.tar.gz
Revert "SERVER-26703 reject commands exceeding the BSON depth limit"
This reverts commit c2b3178e0cae20a24bc9cc39a750bb864def17e3.
Diffstat (limited to 'src/mongo/rpc/object_check.cpp')
-rw-r--r--src/mongo/rpc/object_check.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/mongo/rpc/object_check.cpp b/src/mongo/rpc/object_check.cpp
index 37a8a8c77a6..98ddda58697 100644
--- a/src/mongo/rpc/object_check.cpp
+++ b/src/mongo/rpc/object_check.cpp
@@ -25,38 +25,14 @@
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
+
#include "mongo/platform/basic.h"
#include "mongo/rpc/object_check.h"
#include "mongo/base/status.h"
-#include "mongo/bson/bson_depth.h"
-#include "mongo/db/server_parameters.h"
-#include "mongo/util/stringutils.h"
namespace mongo {
-namespace {
-class MaxBSONDepthParameter
- : public ExportedServerParameter<std::int32_t, ServerParameterType::kStartupOnly> {
-public:
- MaxBSONDepthParameter()
- : ExportedServerParameter<std::int32_t, ServerParameterType::kStartupOnly>(
- ServerParameterSet::getGlobal(), "maxBSONDepth", &BSONDepth::maxAllowableDepth) {}
-
- virtual Status validate(const std::int32_t& potentialNewValue) {
- if (potentialNewValue < BSONDepth::kBSONDepthParameterFloor ||
- potentialNewValue > BSONDepth::kBSONDepthParameterCeiling) {
- return Status(ErrorCodes::BadValue,
- str::stream() << "maxBSONDepth must be between "
- << BSONDepth::kBSONDepthParameterFloor
- << " and "
- << BSONDepth::kBSONDepthParameterCeiling
- << ", inclusive");
- }
- return Status::OK();
- }
-} maxBSONDepthParameter;
-} // namespace
Status Validator<BSONObj>::validateStore(const BSONObj& toStore) {
return Status::OK();