mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved web socket error handling, Selfupdate can now be set to specific version.
This commit is contained in:
parent
25ccec1d81
commit
e6b05f2b4a
6 changed files with 44 additions and 27 deletions
2
db.js
2
db.js
|
@ -48,7 +48,7 @@ module.exports.CreateDB = function (parent) {
|
|||
var datastoreOptions = { filename: obj.parent.getConfigFilePath('meshcentral.db'), autoload: true };
|
||||
|
||||
// If a DB encryption key is provided, perform database encryption
|
||||
if (typeof obj.parent.args.dbencryptkey == 'string') {
|
||||
if ((typeof obj.parent.args.dbencryptkey == 'string') && (obj.parent.args.dbencryptkey.length != 0)) {
|
||||
// Hash the database password into a AES256 key and setup encryption and decryption.
|
||||
obj.dbKey = obj.parent.crypto.createHash('sha384').update(obj.parent.args.dbencryptkey).digest("raw").slice(0, 32);
|
||||
datastoreOptions.afterSerialization = function (plaintext) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue