make privateIDUsername check more lenient #532

This commit is contained in:
Michael C 2023-01-29 16:10:59 -05:00
parent 51d25cfc68
commit b855eea349
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4

View file

@ -33,9 +33,14 @@ export async function setUsername(req: Request, res: Response): Promise<Response
userName = userName.replace(/[\u0000-\u001F\u007F-\u009F]/g, "");
// check privateID against publicID
/*
if (!await checkPrivateUsername(userName, userID)) {
return res.sendStatus(400);
}
*/
if (userName == userID) {
return res.sendStatus(400);
}
if (adminUserIDInput != undefined) {
//this is the admin controlling the other users account, don't hash the controling account's ID