You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was reading browse/src/content-security.ts and noticed a potential security gap.
The issue
The blocklist checks use case‑sensitive string inclusion, e.g., if (url.includes(domain)) { and if (contentUrl.includes(domain)) {, which can be bypassed by using uppercase letters in the domain part of a URL.
Where
urlBlocklistFilter in browse/src/content-security.ts
Suggested fix
Perform case‑insensitive matching on the hostname, for example:
import{URL}from'url';functiondomainMatches(urlStr: string,domain: string): boolean{try{consthostname=newURL(urlStr).hostname.toLowerCase();returnhostname.includes(domain.toLowerCase());}catch{returnfalse;}}// In urlBlocklistFilter replace the checks with:if(domainMatches(url,domain)){ ... }if(domainMatches(contentUrl,domain)){ ... }
Happy to open a PR if that would be useful.
I've tried to follow your contribution guidelines — let me know if I've missed anything.
Activity
Merge pull request #2228 from time-attack/case-insensitive-domain-blo…
fix(browse): case-insensitive exfiltration-domain blocklist matching
chore: merge upstream gstack 2026-07-15 (#11)
chore: merge upstream gstack post-v1.60.1.0
test(gbrain): hermetic isolation + managed-distribution governance ha…