diff --git a/library/agent/Agent.ts b/library/agent/Agent.ts index bed952ae..90782b52 100644 --- a/library/agent/Agent.ts +++ b/library/agent/Agent.ts @@ -168,7 +168,7 @@ export class Agent { module: module, operation: operation, blocked: blocked, - path: paths.join(), + path: paths.length > 0 ? paths[0] : "", stack: stack, source: source, metadata: limitLengthMetadata(metadata, 4096), diff --git a/library/vulnerabilities/ssrf/isRequestToItself.ts b/library/vulnerabilities/ssrf/isRequestToItself.ts index 04f67db3..f60f68a1 100644 --- a/library/vulnerabilities/ssrf/isRequestToItself.ts +++ b/library/vulnerabilities/ssrf/isRequestToItself.ts @@ -26,7 +26,7 @@ export function isRequestToItself({ if (path === ".origin" || path === ".referer") { const url = tryParseURL(str); - if (!!url && url.host === `localhost:${port}`) { + if (url && url.host === `localhost:${port}`) { ignoredPaths++; } }