From 337173bb38c6ed11ca8f50a98328e00ba5306fea Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 3 Apr 2022 17:53:54 +0200 Subject: [PATCH] bin/manage_users: Don't allow empty passwords Signed-off-by: David Mehren --- bin/manage_users | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/manage_users b/bin/manage_users index 8356ab03a..ace6cae3c 100755 --- a/bin/manage_users +++ b/bin/manage_users @@ -42,7 +42,10 @@ async function createUser(argv) { } const pass = getPass(argv, "add"); - + if (pass.length === 0) { + console.log("Password cannot be empty!"); + process.exit(1); + } // Lets try to create, and check success const ref = await models.User.create({email: argv["add"], password: pass});