diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2017-03-06 13:16:52 -0500 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2017-03-06 13:16:52 -0500 |
commit | e2474a4d0d0fd1ba84d8edd201cf0c2334828c9e (patch) | |
tree | 2a154f2687a6e8035cae9fdbe5926baeb2dccd46 /src/mongo/rpc | |
parent | 3084639dfcd5516e77e5ca2e5909356ecf6c9cd4 (diff) | |
download | mongo-e2474a4d0d0fd1ba84d8edd201cf0c2334828c9e.tar.gz |
Revert "SERVER-26703 reject commands exceeding the BSON depth limit"
This reverts commit c2b3178e0cae20a24bc9cc39a750bb864def17e3.
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r-- | src/mongo/rpc/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/rpc/object_check.cpp | 26 |
2 files changed, 1 insertions, 26 deletions
diff --git a/src/mongo/rpc/SConscript b/src/mongo/rpc/SConscript index 64e444c29b6..a4945dcf9c6 100644 --- a/src/mongo/rpc/SConscript +++ b/src/mongo/rpc/SConscript @@ -75,7 +75,6 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/bson/bson_depth', '$BUILD_DIR/mongo/db/server_parameters', ], ) 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(); |