mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 04:57:04 +03:00
Locked the username for undefined.
This commit is contained in:
2
index.js
2
index.js
@@ -282,7 +282,7 @@ app.post('/api/setUsername', function (req, res) {
|
|||||||
let userID = req.query.userID;
|
let userID = req.query.userID;
|
||||||
let userName = req.query.username;
|
let userName = req.query.username;
|
||||||
|
|
||||||
if (userID == undefined || userName == undefined) {
|
if (userID == undefined || userName == undefined || userID === "undefined") {
|
||||||
//invalid request
|
//invalid request
|
||||||
res.sendStatus(400);
|
res.sendStatus(400);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user