mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -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");
|
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
|
// Lets try to create, and check success
|
||||||
const ref = await models.User.create({email: argv["add"], password: pass});
|
const ref = await models.User.create({email: argv["add"], password: pass});
|
||||||
|
|
Loading…
Reference in a new issue