From fd4ae337edaecef61429ec0738e0c953a9ae26bc Mon Sep 17 00:00:00 2001 From: AiP24 <73043756+AiP24@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:22:30 -0700 Subject: [PATCH] Fix blank user handler Ignores blank users/ids --- src/state/DB.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/state/DB.js b/src/state/DB.js index a2e5d50..7c32109 100644 --- a/src/state/DB.js +++ b/src/state/DB.js @@ -139,7 +139,10 @@ class DB { addUser(user) { log.info('Adding user: ' + user.name); - if (this.query({id: user.id})) return false; + if (this.query({id: user.id}) || user.id === "" || user.name === "") return false; + //an existing username probably does something bad, idk I'm just a noob + //the system freaks out on empty username, so just say no + //same with passwords this.users.push({ name: user.name,