mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-18 11:41:28 +03:00
Passwords now must be provided when registering a user
This commit is contained in:
@@ -89,6 +89,12 @@ exports.registerUser = function(req, res) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (plaintextPassword === "") {
|
||||||
|
res.sendStatus(400);
|
||||||
|
logger.error(`Registration failed for user ${userid}. A password must be provided.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bcrypt.hash(plaintextPassword, saltRounds)
|
bcrypt.hash(plaintextPassword, saltRounds)
|
||||||
.then(function(hash) {
|
.then(function(hash) {
|
||||||
let new_user = generateUserObject(userid, username, hash);
|
let new_user = generateUserObject(userid, username, hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user