Über uns
+
+
{
// In production (.output/server), working dir is .output
if (cwd.endsWith('.output')) {
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, '../server/data', filename)
}
// In development, working dir is project root
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'server/data', filename)
}
diff --git a/server/utils/email-service.js b/server/utils/email-service.js
index ddccd62..38be71c 100644
--- a/server/utils/email-service.js
+++ b/server/utils/email-service.js
@@ -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)
}
}
diff --git a/server/utils/members.js b/server/utils/members.js
index e3b8732..e45612f 100644
--- a/server/utils/members.js
+++ b/server/utils/members.js
@@ -11,10 +11,12 @@ const getDataPath = (filename) => {
// In production (.output/server), working dir is .output
if (cwd.endsWith('.output')) {
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, '../server/data', filename)
}
// In development, working dir is project root
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'server/data', filename)
}
diff --git a/server/utils/news.js b/server/utils/news.js
index edee946..2c0138a 100644
--- a/server/utils/news.js
+++ b/server/utils/news.js
@@ -10,10 +10,12 @@ const getDataPath = (filename) => {
// In production (.output/server), working dir is .output
if (cwd.endsWith('.output')) {
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, '../server/data', filename)
}
// In development, working dir is project root
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'server/data', filename)
}
diff --git a/server/utils/newsletter.js b/server/utils/newsletter.js
index 3b55022..84579ff 100644
--- a/server/utils/newsletter.js
+++ b/server/utils/newsletter.js
@@ -10,8 +10,10 @@ import crypto from 'crypto'
const getDataPath = (filename) => {
const cwd = process.cwd()
if (cwd.endsWith('.output')) {
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, '../server/data', filename)
}
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'server/data', filename)
}
diff --git a/server/utils/termine.js b/server/utils/termine.js
index 87b8e66..ba7aa7c 100644
--- a/server/utils/termine.js
+++ b/server/utils/termine.js
@@ -3,17 +3,18 @@ import path from 'path'
import { randomUUID } from 'crypto'
// Handle both dev and production paths
-// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
// filename is always a hardcoded constant (e.g., 'termine.csv'), never user input
const getDataPath = (filename) => {
const cwd = process.cwd()
// In production (.output/server), working dir is .output
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
if (cwd.endsWith('.output')) {
return path.join(cwd, '../public/data', filename)
}
// In development, working dir is project root
+ // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'public/data', filename)
}