Enforce user file types at runtime
This commit is contained in:
parent
f269ac3bee
commit
2365c9489e
@ -62,6 +62,9 @@ function Client(manager, name, config = {}) {
|
|||||||
|
|
||||||
const client = this;
|
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.public && client.config.log) {
|
||||||
if (Helper.config.messageStorage.includes("sqlite")) {
|
if (Helper.config.messageStorage.includes("sqlite")) {
|
||||||
client.messageStorage.push(new MessageStorage(client));
|
client.messageStorage.push(new MessageStorage(client));
|
||||||
|
@ -134,10 +134,6 @@ ClientManager.prototype.addUser = function(name, password, enableLog) {
|
|||||||
const user = {
|
const user = {
|
||||||
password: password || "",
|
password: password || "",
|
||||||
log: enableLog,
|
log: enableLog,
|
||||||
networks: [],
|
|
||||||
sessions: {},
|
|
||||||
clientSettings: {},
|
|
||||||
browser: {},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user