Opened 4 months ago

Last modified 4 months ago

#7418 new defect

Subframe request blocked in whitelisted frame

Reported by: greiner Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords:
Cc: sebastian, greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Ubuntu 16.04
Chrome 71
Adblock Plus 3.4.3 / 3.4.2

How to reproduce

  1. Add the custom filters /ad.htm^ and @@/sub.htm$document
  2. Create top.htm, sub.htm and ad.htm and launch static web server (see file contents below)
  3. Open top.htm (e.g. http://localhost:8080/top.htm)

Example file contents

top.htm

<iframe src="sub.htm" height="500"></iframe>

sub.htm

<strong>With srcdoc</strong>
<iframe srcdoc=""></iframe>

<strong>Without srcdoc</strong>
<iframe></iframe>

<script>
let iframes = document.querySelectorAll("iframe");
for (let iframe of iframes) {
  iframe.contentDocument.write(`
    <iframe src="ad.htm"></iframe> 
  `);
}
</script>

ad.htm

ADVERTISEMENT

Observed behavior

  • Frame under heading "With srcdoc" failed to load
  • Frame under heading "Without srcdoc" loads successfully
  • Request to ad.htm is shown in DevTools as being blocked by filter /ad.htm^

Expected behavior

  • Both frames load successfully
  • Request to ad.htm is not shown in DevTools as being blocked

Further information

This ticket refers to an edge case related to subframes that we didn't cover in #7305.

Change History (1)

comment:1 Changed 4 months ago by sebastian

  • Cc sebastian greiner added
Note: See TracTickets for help on using tickets.