Skip to content

Commit e2e943f

Browse files
fix(admin): validate GitHub URL host (#3847)
fix(admin): validate exact GitHub host Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
1 parent 3cff0fb commit e2e943f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/web/src/app/admin/oss/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function extractRepoName(githubUrl: string): string | null {
7777
url = 'https://' + url;
7878
}
7979
const parsed = new URL(url);
80-
if (!parsed.hostname.includes('github.com')) {
80+
if (!['github.com', 'www.github.com'].includes(parsed.hostname.toLowerCase())) {
8181
return null;
8282
}
8383
const pathParts = parsed.pathname.split('/').filter(Boolean);

0 commit comments

Comments
 (0)