sanitize only accepts strings

This commit is contained in:
RealBeepMcJeep 2023-08-30 08:35:19 -07:00
parent e1df933368
commit 6ca678e137
1 changed files with 2 additions and 1 deletions

View File

@ -5365,7 +5365,8 @@ app.post('/asset_delete', jsonParser, async (request, response) => {
* @returns {void}
*/
app.post('/get_character_assets_list', jsonParser, async (request, response) => {
const name = sanitize(request.query.name);
if (request.query.name === undefined) return response.sendStatus(400);
const name = sanitize(request.query.name.toString());
const inputCategory = request.query.category;
const validCategories = ["bgm", "ambient"]