chore: lint
This commit is contained in:
parent
edea7a55dc
commit
3ec910d177
2 changed files with 10 additions and 2 deletions
|
|
@ -171,7 +171,10 @@ export async function handleConvert(
|
|||
if (fileTypeOrig === "") {
|
||||
newFileName = `${fileName}.${newFileExt}`;
|
||||
} else {
|
||||
newFileName = fileName.replace(new RegExp(`${fileTypeOrig}(?!.*${fileTypeOrig})`), newFileExt);
|
||||
newFileName = fileName.replace(
|
||||
new RegExp(`${fileTypeOrig}(?!.*${fileTypeOrig})`),
|
||||
newFileExt,
|
||||
);
|
||||
}
|
||||
const targetPath = `${userOutputDir}${newFileName}`;
|
||||
toProcess.push(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ export const convert = new Elysia().use(userService).post(
|
|||
const convertTo = normalizeFiletype(body.convert_to.split(",")[0] ?? "");
|
||||
const converterName = body.convert_to.split(",")[1];
|
||||
|
||||
if (!converterName || convertTo.includes("/") || convertTo.includes("\\") || convertTo.includes("..")) {
|
||||
if (
|
||||
!converterName ||
|
||||
convertTo.includes("/") ||
|
||||
convertTo.includes("\\") ||
|
||||
convertTo.includes("..")
|
||||
) {
|
||||
return redirect(`${WEBROOT}/`, 302);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue