Add username length limit

This commit is contained in:
Ajay Ramachandran
2020-08-29 20:05:49 -04:00
parent 49cfbdd95f
commit 262d3d3dfd

View File

@@ -12,7 +12,7 @@ module.exports = function setUsername(req, res) {
let adminUserIDInput = req.query.adminUserID;
if (userID == undefined || userName == undefined || userID === "undefined") {
if (userID == undefined || userName == undefined || userID === "undefined" || username.length > 50) {
//invalid request
res.sendStatus(400);
return;