Enhance security by adding role-checking functions in ESLint configuration and updating Vue components to improve content sanitization comments, while refining error handling in API endpoints for better clarity.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 3m40s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 3m40s
This commit is contained in:
@@ -313,7 +313,7 @@ function getDataPath(filename) {
|
||||
// In der Produktion: process.cwd() ist .output, daher ein Verzeichnis zurück
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
const projectRoot = isDev ? process.cwd() : path.resolve(process.cwd(), '..')
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
return path.join(projectRoot, 'server', 'data', filename)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
}
|
||||
|
||||
const dataDir = path.join(process.cwd(), 'server/data/membership-applications') // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
const filePath = path.join(dataDir, `${id}.json`) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
const dataDir = path.join(process.cwd(), 'server/data/membership-applications')
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
const filePath = path.join(dataDir, `${id}.json`)
|
||||
|
||||
// Antrag laden
|
||||
const fileContent = await fs.readFile(filePath, 'utf8')
|
||||
|
||||
Reference in New Issue
Block a user