v1.12.31 불필요 파일 정리 및 업로드·배포 안정성 보강
This commit is contained in:
@@ -82,7 +82,7 @@ const resolveUploadFilePath = (pathname) => {
|
||||
|
||||
const relativeUrlPath = decodedPath.replace(/^\/uploads\/?/g, '')
|
||||
|
||||
if (!relativeUrlPath || relativeUrlPath.includes('\0') || relativeUrlPath === '_import-jobs' || relativeUrlPath.startsWith('_import-jobs/')) {
|
||||
if (!relativeUrlPath || relativeUrlPath.includes('\0')) {
|
||||
throw createError({
|
||||
statusCode: 404,
|
||||
message: '업로드 파일을 찾을 수 없습니다.'
|
||||
@@ -99,6 +99,13 @@ const resolveUploadFilePath = (pathname) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (relativeDiskPath === '_import-jobs' || relativeDiskPath.startsWith('_import-jobs/')) {
|
||||
throw createError({
|
||||
statusCode: 404,
|
||||
message: '업로드 파일을 찾을 수 없습니다.'
|
||||
})
|
||||
}
|
||||
|
||||
return filePath
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user