Skip to content

Commit c00ae78

Browse files
authored
Bugfix/add path traversal check to chatId (#5208)
* add path traversal check to chatId * update axios
1 parent b2dcdab commit c00ae78

File tree

6 files changed

+50
-50
lines changed

6 files changed

+50
-50
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"sqlite3"
6767
],
6868
"overrides": {
69-
"axios": "1.10.0",
69+
"axios": "1.12.0",
7070
"body-parser": "2.0.2",
7171
"braces": "3.0.3",
7272
"cross-spawn": "7.0.6",

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"@zilliz/milvus2-sdk-node": "^2.2.24",
8484
"apify-client": "^2.7.1",
8585
"assemblyai": "^4.2.2",
86-
"axios": "1.7.9",
86+
"axios": "1.12.0",
8787
"cheerio": "^1.0.0-rc.12",
8888
"chromadb": "^1.10.0",
8989
"cohere-ai": "^7.7.5",

packages/components/src/storageUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ export const streamStorageFile = async (
753753
}
754754

755755
// Check for path traversal attempts
756-
if (isPathTraversal(chatflowId)) {
757-
throw new Error('Invalid path characters detected in chatflowId')
756+
if (isPathTraversal(chatflowId) || isPathTraversal(chatId)) {
757+
throw new Error('Invalid path characters detected in chatflowId or chatId')
758758
}
759759

760760
const storageType = getStorageType()

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"@types/passport-local": "^1.0.38",
8888
"@types/uuid": "^9.0.7",
8989
"async-mutex": "^0.4.0",
90-
"axios": "1.7.9",
90+
"axios": "1.12.0",
9191
"bcryptjs": "^2.4.3",
9292
"bullmq": "5.45.2",
9393
"cache-manager": "^6.3.2",

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@uiw/codemirror-theme-sublime": "^4.21.21",
3535
"@uiw/codemirror-theme-vscode": "^4.21.21",
3636
"@uiw/react-codemirror": "^4.21.21",
37-
"axios": "1.7.9",
37+
"axios": "1.12.0",
3838
"clsx": "^1.1.1",
3939
"dompurify": "^3.2.6",
4040
"dotenv": "^16.0.0",

0 commit comments

Comments
 (0)