Skip to content

Commit 1be6f16

Browse files
adjusted traversal path validation (#1533)
1 parent bf90915 commit 1be6f16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function normalizePathParam(
133133
}
134134

135135
// Step 2: Check for path traversal in decoded value
136-
if (decoded.includes("..")) {
136+
if (decoded.includes("../") || decoded.includes("..\\")) {
137137
throw new Error(
138138
`Path traversal detected in parameter '${paramName}'`,
139139
);

0 commit comments

Comments
 (0)