From d4554d2fa7e8447d4688b49c09c6f386282f4581 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Tue, 13 Dec 2016 20:50:15 -0800 Subject: [PATCH] Do not accept empty password when adding new user; closes #316 --- src/command-line/add.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/command-line/add.js b/src/command-line/add.js index 2a852663..c86bedd5 100644 --- a/src/command-line/add.js +++ b/src/command-line/add.js @@ -18,6 +18,10 @@ program prompt: "[thelounge] Enter password: ", silent: true }, function(err, password) { + if (!password) { + log.error("Password cannot be empty."); + return; + } if (!err) { add(manager, name, password); }