Weirdness with iframe srcdocs

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 11110
Joined: Sat Aug 03, 2013 5:45 pm

Weirdness with iframe srcdocs

Post by barbaz »

SeaMonkey 2.23, NS 2.6.8.9rc5. If I Allow file://, then open a file with this contents:

Code: Select all

<!DOCTYPE html>
<iframe srcdoc="<script type="text/javascript">alert("Cuckoo");</script><div>text</div>"></iframe>
<div id="2">noscript</div>
<script type="text/javascript">document.getElementById("2").innerHTML = "Script";</script>
I get an alert even though about:srcdoc is listed as forbidden in the menu :?:
This is unexpected behavior - it would be better if about:srcdoc is either not shown in the menu (with each srcdoc automatically getting the same permissions as its parent page), or scripts from srcdocs are forbidden until explicitly allowing about:srcdoc. Would it be possible (and reasonable) to make one of those changes?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
User avatar
Giorgio Maone
Site Admin
Posts: 9530
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Weirdness with iframe srcdocs

Post by Giorgio Maone »

barbaz wrote:it would be better if about:srcdoc is either not shown in the menu (with each srcdoc automatically getting the same permissions as its parent page), or scripts from srcdocs are forbidden until explicitly allowing about:srcdoc. Would it be possible (and reasonable) to make one of those changes?
Yes, probably the former (just ignoring about:srcdoc or making it unmodifiable like chrome:) is the most viable and less confusing.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
User avatar
Giorgio Maone
Site Admin
Posts: 9530
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Weirdness with iframe srcdocs

Post by Giorgio Maone »

Please check latest development build 2.6.8.10rc1, thanks.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Post Reply