Skip to content

Commit c31d2fe

Browse files
AlexTugarevroboquat
authored andcommitted
[dashboard] Fix rendering of the redirect URI on Git Integrations page
1 parent 367bbc7 commit c31d2fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/dashboard/src/settings/Integrations.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,12 @@ export function GitIntegrationModal(
643643
newHostValue = host.replace("https://", "");
644644
}
645645

646+
// Negative Lookahead (?!\/)
647+
// `\/` matches the character `/`
648+
// "https://foobar:80".replace(/:(?!\/)/, "_")
649+
// => 'https://foobar_80'
650+
newHostValue = host.replace(/:(?!\/)/, "_");
651+
646652
setHost(newHostValue);
647653
setRedirectURL(callbackUrl(newHostValue));
648654
setErrorMessage(undefined);

0 commit comments

Comments
 (0)