mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-22 01:13:20 +03:00
Prevent null userid/username registration
This commit is contained in:
@@ -1946,6 +1946,10 @@ app.post('/api/auth/register', optionalJwt, async (req, res) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!userid || !username) {
|
||||||
|
logger.error(`Registration failed for user ${userid}. Username or userid is invalid.`);
|
||||||
|
}
|
||||||
|
|
||||||
const new_user = await auth_api.registerUser(userid, username, plaintextPassword);
|
const new_user = await auth_api.registerUser(userid, username, plaintextPassword);
|
||||||
|
|
||||||
if (!new_user) {
|
if (!new_user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user