From 21e196e35c32d65325414bd2702424ffec74c825 Mon Sep 17 00:00:00 2001 From: si458 Date: Sat, 24 Aug 2024 00:12:14 +0100 Subject: [PATCH] dont do utf8 validation for mongodb #6340 Signed-off-by: si458 --- db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.js b/db.js index 66c464f8..9dc351b5 100644 --- a/db.js +++ b/db.js @@ -882,7 +882,7 @@ module.exports.CreateDB = function (parent, func) { if (global.TextEncoder == null) { global.TextEncoder = require('util').TextEncoder; } if (global.TextDecoder == null) { global.TextDecoder = require('util').TextDecoder; } - require('mongodb').MongoClient.connect(parent.args.mongodb, { useNewUrlParser: true, useUnifiedTopology: true }, function (err, client) { + require('mongodb').MongoClient.connect(parent.args.mongodb, { useNewUrlParser: true, useUnifiedTopology: true, enableUtf8Validation: false }, function (err, client) { if (err != null) { console.log("Unable to connect to database: " + err); process.exit(); return; } Datastore = client; parent.debug('db', 'Connected to MongoDB database...');