Reject illegal names
This commit is contained in:
@ -34,7 +34,12 @@ export const actions = {
|
||||
return fail(400, { field: 'name', name: formName, incorrect: true });
|
||||
}
|
||||
|
||||
const name = safePath(formName as string);
|
||||
const name = formName as string;
|
||||
|
||||
if (!safePath(name, storagePath)) {
|
||||
return fail(400, { field: 'name', name: name, incorrect: true });
|
||||
}
|
||||
// const name = safePath(formName as string);
|
||||
|
||||
files.forEach(async (file) => {
|
||||
const outPath = `${storagePath}/${name}`;
|
||||
|
Reference in New Issue
Block a user