From 2365c9489eb3e15ca30ddd300ad7e35db417bf3d Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 15 Dec 2019 17:29:39 +0200 Subject: [PATCH] Enforce user file types at runtime --- src/client.js | 3 +++ src/clientManager.js | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client.js b/src/client.js index 8a9f19a3..909824f5 100644 --- a/src/client.js +++ b/src/client.js @@ -62,6 +62,9 @@ function Client(manager, name, config = {}) { const client = this; + client.config.log = Boolean(client.config.log); + client.config.password = String(client.config.password); + if (!Helper.config.public && client.config.log) { if (Helper.config.messageStorage.includes("sqlite")) { client.messageStorage.push(new MessageStorage(client)); diff --git a/src/clientManager.js b/src/clientManager.js index a591554b..dfe8a673 100644 --- a/src/clientManager.js +++ b/src/clientManager.js @@ -134,10 +134,6 @@ ClientManager.prototype.addUser = function(name, password, enableLog) { const user = { password: password || "", log: enableLog, - networks: [], - sessions: {}, - clientSettings: {}, - browser: {}, }; try {