Skip to content

Commit 29e9c2b

Browse files
claude[bot]N2D4
andcommitted
Fix path concatenation vulnerability in user page
Prevents double slashes when handlerPath is '/' and endpointPath starts with '/' by using proper path joining logic: handlerPath.replace(/\/?$/, '/') + endpointPath.replace(/^\//, '') Co-authored-by: Konsti Wohlwend <N2D4@users.noreply.github.com>
1 parent e0e8a3a commit 29e9c2b

File tree

1 file changed

+1
-1
lines changed
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/users/[userId]

1 file changed

+1
-1
lines changed

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/users/[userId]/page-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ function SendEmailWithDomainDialog({
572572
baseUrl = domain.domain;
573573
handlerPath = domain.handlerPath;
574574
}
575-
const callbackUrl = new URL(handlerPath + endpointPath, baseUrl).toString();
575+
const callbackUrl = new URL(handlerPath.replace(/\/?$/, '/') + endpointPath.replace(/^\//, ''), baseUrl).toString();
576576
await onSubmit(callbackUrl);
577577
}}
578578
/>

0 commit comments

Comments
 (0)