mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 08:38:53 +01:00
should be a string according to types
This commit is contained in:
parent
2928c79446
commit
4e78c3ec79
@ -5265,7 +5265,7 @@ app.post('/asset_download', jsonParser, async (request, response) => {
|
|||||||
// Sanitize filename
|
// Sanitize filename
|
||||||
const safe_input = checkAssetFileName(inputFilename);
|
const safe_input = checkAssetFileName(inputFilename);
|
||||||
if (safe_input == '')
|
if (safe_input == '')
|
||||||
return response.sendFile(400);
|
return response.sendFile('400');
|
||||||
|
|
||||||
const temp_path = path.join(directories.assets, "temp", safe_input)
|
const temp_path = path.join(directories.assets, "temp", safe_input)
|
||||||
const file_path = path.join(directories.assets, category, safe_input)
|
const file_path = path.join(directories.assets, category, safe_input)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user