Skip to content

Commit

Permalink
skip domain
Browse files Browse the repository at this point in the history
  • Loading branch information
yariksav committed Jul 26, 2024
1 parent 2379b9c commit 806147f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import pLimit from 'p-limit';
import { Address, PublicClient, getAddress } from 'viem';

const limiter = pLimit(100);
const skipDomains = ['example.com', 'localhost', '{}'];
const skipDomains = ['example.com', 'localhost'];

Check failure

Code scanning / CodeQL

Missing regular expression anchor High

When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it.
const skipDomainsRegex = new RegExp(skipDomains.map((domain) => `(${domain})`).join('|'), 'i');
const containsIpWithPortRegex = /(https?:\/\/)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(:\d+)?\/?[\w\\/.-]*\b/;
const isUrlCorrectRegex =
Expand Down

0 comments on commit 806147f

Please sign in to comment.