1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Fix injection blocklist regex (#20584)

This commit is contained in:
Frederik Bolding 2023-08-24 16:01:04 +02:00 committed by GitHub
parent 9514b47a7e
commit b9097de9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ function blockedDomainCheck() {
const currentUrl = window.location.href;
let currentRegex;
for (let i = 0; i < blockedDomains.length; i++) {
const blockedDomain = blockedDomains[i].replace('.', '\\.');
const blockedDomain = blockedDomains[i].replaceAll('.', '\\.');
currentRegex = new RegExp(
`(?:https?:\\/\\/)(?:(?!${blockedDomain}).)*$`,
'u',