Skip to content

Commit 25efd71

Browse files
committed
Fix edge case
1 parent 8c768a9 commit 25efd71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/vulnerabilities/ssrf/isRequestToItself.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function isRequestToItself({
1212
port: number | undefined;
1313
paths: string[];
1414
}): boolean {
15-
if (source !== "headers" || typeof port !== "number") {
15+
if (source !== "headers" || typeof port !== "number" || paths.length === 0) {
1616
return false;
1717
}
1818

0 commit comments

Comments
 (0)