From e2474a4d0d0fd1ba84d8edd201cf0c2334828c9e Mon Sep 17 00:00:00 2001 From: Max Hirschhorn Date: Mon, 6 Mar 2017 13:16:52 -0500 Subject: Revert "SERVER-26703 reject commands exceeding the BSON depth limit" This reverts commit c2b3178e0cae20a24bc9cc39a750bb864def17e3. --- src/mongo/rpc/object_check.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/mongo/rpc/object_check.cpp') 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 { -public: - MaxBSONDepthParameter() - : ExportedServerParameter( - 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::validateStore(const BSONObj& toStore) { return Status::OK(); -- cgit v1.2.1