Skip to content

Commit

Permalink
fixed redirect url check
Browse files Browse the repository at this point in the history
  • Loading branch information
fomalhautb committed Jul 25, 2024
1 parent f40b481 commit 7c4d27b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/backend/src/lib/redirect-urls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function validateRedirectUrl(urlOrString: string | URL, domains: { domain
}
return domains.some((domain) => {
const testUrl = url;
const baseUrl = new URL(domain.handler_path, domain.domain);
const baseUrl = new URL(domain.domain);

const sameOrigin = baseUrl.protocol === testUrl.protocol && baseUrl.hostname === testUrl.hostname;
const isSubPath = testUrl.pathname.startsWith(baseUrl.pathname);
Expand Down

0 comments on commit 7c4d27b

Please sign in to comment.