sanitize only accepts strings
This commit is contained in:
parent
e1df933368
commit
6ca678e137
|
@ -5365,7 +5365,8 @@ app.post('/asset_delete', jsonParser, async (request, response) => {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
app.post('/get_character_assets_list', jsonParser, async (request, response) => {
|
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 inputCategory = request.query.category;
|
||||||
const validCategories = ["bgm", "ambient"]
|
const validCategories = ["bgm", "ambient"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue