mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed insecure dependencies.
This commit is contained in:
parent
57b1622d2d
commit
959c147295
5 changed files with 18 additions and 7 deletions
3
db.js
3
db.js
|
@ -923,7 +923,8 @@ module.exports.CreateDB = function (parent, func) {
|
|||
} else {
|
||||
// Use NeDB (The default)
|
||||
obj.databaseType = 1;
|
||||
Datastore = require('nedb');
|
||||
try { Datastore = require('@yetzt/nedb'); } catch (ex) { } // This is the NeDB with fixed security dependencies.
|
||||
if (Datastore == null) { Datastore = require('nedb'); } // So not to break any existing installations, if the old NeDB is present, use it.
|
||||
var datastoreOptions = { filename: parent.getConfigFilePath('meshcentral.db'), autoload: true };
|
||||
|
||||
// If a DB encryption key is provided, perform database encryption
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue