mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
bin/manage_users: Don't allow empty passwords
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
101bedaecd
commit
337173bb38
1 changed files with 4 additions and 1 deletions
|
@ -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});
|
||||
|
|
Loading…
Reference in a new issue