diff options
author | Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> | 2020-12-31 08:54:10 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-31 10:33:54 +0000 |
commit | adb20b92c1c8dca3c1529412fb18026a5766ef5d (patch) | |
tree | d66959803c16e9890916b693791ce17ad8c39e54 /src/mongo/db/initialize_api_parameters.cpp | |
parent | ea05979fbb7c029e5179c4c0dc0a0b13fa8de3d6 (diff) | |
download | mongo-adb20b92c1c8dca3c1529412fb18026a5766ef5d.tar.gz |
Revert "SERVER-51615 Disallow writes to system.js collection with apiStrict:true"
This reverts commit 11ba9fe9ff8140ceaed147f70a7524bde67e47ec.
Diffstat (limited to 'src/mongo/db/initialize_api_parameters.cpp')
-rw-r--r-- | src/mongo/db/initialize_api_parameters.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mongo/db/initialize_api_parameters.cpp b/src/mongo/db/initialize_api_parameters.cpp index d480e3acf2b..1c4ec3c1009 100644 --- a/src/mongo/db/initialize_api_parameters.cpp +++ b/src/mongo/db/initialize_api_parameters.cpp @@ -75,14 +75,6 @@ const APIParametersFromClient initializeAPIParameters(const BSONObj& requestBody str::stream() << "Provided apiStrict:true, but the command " << command->getName() << " is not in API Version " << apiVersionFromClient, strictAssert); - bool strictDoesntWriteToSystemJS = - !(command->getReadWriteType() == BasicCommand::ReadWriteType::kWrite && - requestBody.firstElementType() == BSONType::String && - requestBody.firstElement().String() == "system.js"); - uassert(ErrorCodes::APIStrictError, - str::stream() << "Provided apiStrict:true, but the command " << command->getName() - << " attempts to write to system.js", - strictDoesntWriteToSystemJS); } if (apiParamsFromClient.getApiDeprecationErrors().get_value_or(false)) { |