Skip to content

Commit 41ee564

Browse files
authored
Not sanitizing URLs that doesn't start with http when getting organization domain (#1540)
1 parent ae65bf2 commit 41ee564

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/libs/integrations/src/integrations/premium/hubspot/api/utils/getOrganizationDomain.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
export const getOrganizationDomain = (website: string): string => {
22
try {
3-
return new URL(website).host
3+
if (website.startsWith('http')) {
4+
return new URL(website).host
5+
}
6+
return website
47
} catch (e) {
58
return null
69
}

0 commit comments

Comments
 (0)