Skip to content

Commit

Permalink
Potential fix for code scanning alert no. 14: Incomplete string escap…
Browse files Browse the repository at this point in the history
…ing or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
0oM4R and github-advanced-security[bot] authored Feb 18, 2025
1 parent d5615ec commit 193a62e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/playground/src/utils/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function extractDomainIP(domainBackend: string) {
const ip = domainBackend.replace("https://", "").replace("http://", "");
// Handle IPv6
if (domainBackend.includes("[")) {
const ipAddress = ip.replace("[", "").split("]:")[0];
const ipAddress = ip.replace(/\[/g, "").split("]:")[0];
if (!ipAddress) {
throw new Error(`Invalid input "${domainBackend}": Invalid IPv6 address format.`);
}
Expand Down

0 comments on commit 193a62e

Please sign in to comment.