summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/make_js_function.cpp
diff options
context:
space:
mode:
authorNicholas Zolnierz <nicholas.zolnierz@mongodb.com>2019-11-27 15:30:55 +0000
committerevergreen <evergreen@mongodb.com>2019-11-27 15:30:55 +0000
commitffb879d9c4a51a08162ee8c0f54c2a9581e3fe1e (patch)
tree43299fc37860c55f88f043e54d5a24906144a58a /src/mongo/db/pipeline/make_js_function.cpp
parent7b0edfd21b758ee71d34b8dfd49929b08c007c8f (diff)
downloadmongo-ffb879d9c4a51a08162ee8c0f54c2a9581e3fe1e.tar.gz
SERVER-44774 Check that scripting is enabled before evaluating javascript expressions
Diffstat (limited to 'src/mongo/db/pipeline/make_js_function.cpp')
-rw-r--r--src/mongo/db/pipeline/make_js_function.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/make_js_function.cpp b/src/mongo/db/pipeline/make_js_function.cpp
index d23e4628694..eacb6d82d36 100644
--- a/src/mongo/db/pipeline/make_js_function.cpp
+++ b/src/mongo/db/pipeline/make_js_function.cpp
@@ -37,9 +37,6 @@ namespace mongo {
// it as a JS function.
ScriptingFunction makeJsFunc(boost::intrusive_ptr<ExpressionContext> expCtx,
const std::string& func) {
- uassert(31241,
- "Cannot run server-side javascript without the javascript engine enabled",
- getGlobalScriptEngine());
auto jsExec = expCtx->getJsExecWithScope();
ScriptingFunction parsedFunc = jsExec->getScope()->createFunction(func.c_str());
uassert(