Enhance security by adding DOMPurify sanitization comments in newsletter and Vereins components, and update path handling comments in server utilities to address potential path traversal vulnerabilities.
This commit is contained in:
@@ -18,8 +18,10 @@ function getDataPath(filename) {
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
if (isProduction) {
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
return path.join(process.cwd(), '..', 'server', 'data', filename)
|
||||
} else {
|
||||
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
|
||||
return path.join(process.cwd(), 'server', 'data', filename)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user