Skip to content

Commit

Permalink
Drop widget surrogate msg frame check CNAME lookup
Browse files Browse the repository at this point in the history
If a nested frame is CNAME aliased to a first party hostname,
then let's accept widget surrogate messages as that frame
was opted into the site's infrastructure by the publisher.
  • Loading branch information
ghostwords committed Jul 17, 2024
1 parent ed7bb6a commit dd1903b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/js/webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1780,10 +1780,6 @@ function dispatcher(request, sender, sendResponse) {
let tab_scheme = tab_url.slice(0, tab_url.indexOf(tab_host));
if (!request.frameUrl.startsWith(tab_scheme + tab_host)) {
let frame_host = extractHostFromURL(request.frameUrl);
// CNAME uncloaking
if (utils.hasOwn(badger.cnameDomains, frame_host)) {
frame_host = badger.cnameDomains[frame_host];
}
if (!frame_host || utils.isThirdPartyDomain(frame_host, tab_host)) {
break;
}
Expand Down

0 comments on commit dd1903b

Please sign in to comment.