<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: DOM DOS Firefox</title>
	<atom:link href="http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/</link>
	<description>A tool for designers dealing with programmers dealing with designers...</description>
	<pubDate>Thu, 20 Nov 2008 22:57:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1056</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Thu, 10 Jan 2008 19:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1056</guid>
		<description>Yep another good example, browsers should protect against this stuff. Firefox already does to some extent but obviously it needs to improve.</description>
		<content:encoded><![CDATA[<p>Yep another good example, browsers should protect against this stuff. Firefox already does to some extent but obviously it needs to improve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1055</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Thu, 10 Jan 2008 18:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1055</guid>
		<description>Gareth, Zach's testcase is a good example of what I was saying: there are many many ways to cause exponential growth. Try this one:

  function f() {
    document.body.appendChild(document.createElement('div'));
    setTimeout(f, 0);
    setTimeout(f, 0);
  }
  f();

And I've seen ajax applications that had more or less this exact code, cutting off the recursion after some point.  The problem is telling on the browser side whether they plan to do that or not (if wanting to only block malicious pages).  Of course imposing resource limits in general would work, but it would also limit the scope of what webapps can do.  That might be a good thing, of course.</description>
		<content:encoded><![CDATA[<p>Gareth, Zach&#8217;s testcase is a good example of what I was saying: there are many many ways to cause exponential growth. Try this one:</p>
<p>  function f() {<br />
    document.body.appendChild(document.createElement(&#8217;div&#8217;));<br />
    setTimeout(f, 0);<br />
    setTimeout(f, 0);<br />
  }<br />
  f();</p>
<p>And I&#8217;ve seen ajax applications that had more or less this exact code, cutting off the recursion after some point.  The problem is telling on the browser side whether they plan to do that or not (if wanting to only block malicious pages).  Of course imposing resource limits in general would work, but it would also limit the scope of what webapps can do.  That might be a good thing, of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1054</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Thu, 10 Jan 2008 16:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1054</guid>
		<description>Thanks for the info Zach, I'll fix Spambam when I get a minute cheers</description>
		<content:encoded><![CDATA[<p>Thanks for the info Zach, I&#8217;ll fix Spambam when I get a minute cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1053</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Thu, 10 Jan 2008 16:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1053</guid>
		<description>I tried this variant:
&#60;iframe src="" onload="appendChild(cloneNode(appendChild(cloneNode(1))))"&#62;

And it used full CPU on FF2, Opera, and FF3 beta, though Opera remained fairly responsive so I could close the tab. FF2 froze quickly. FF3 was unresponsive but did not freeze after about 15 seconds so I could still close the tab, though it took several seconds to actually close it.

Firefox does give you a prompt for scripts that take longer than usual to execute (like applying DHTML affects by DOM on a huge page), but this DOS is something of a different nature.

(and SpamBam doesn't seem to like FF3 ;)</description>
		<content:encoded><![CDATA[<p>I tried this variant:<br />
&lt;iframe src=&#8221;" onload=&#8221;appendChild(cloneNode(appendChild(cloneNode(1))))&#8221;&gt;</p>
<p>And it used full CPU on FF2, Opera, and FF3 beta, though Opera remained fairly responsive so I could close the tab. FF2 froze quickly. FF3 was unresponsive but did not freeze after about 15 seconds so I could still close the tab, though it took several seconds to actually close it.</p>
<p>Firefox does give you a prompt for scripts that take longer than usual to execute (like applying DHTML affects by DOM on a huge page), but this DOS is something of a different nature.</p>
<p>(and SpamBam doesn&#8217;t seem to like FF3 <img src='http://www.thespanner.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1052</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Thu, 10 Jan 2008 10:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1052</guid>
		<description>Firefox is my weapon of choice mainly because of plugins. Opera is a better browser though</description>
		<content:encoded><![CDATA[<p>Firefox is my weapon of choice mainly because of plugins. Opera is a better browser though</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vindic</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1051</link>
		<dc:creator>vindic</dc:creator>
		<pubDate>Thu, 10 Jan 2008 09:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1051</guid>
		<description>Gareth: are you using Opera? or something else</description>
		<content:encoded><![CDATA[<p>Gareth: are you using Opera? or something else</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1050</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Thu, 10 Jan 2008 09:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1050</guid>
		<description>@Boris

I like having sensible discussions but comparing ajax applications to the code sample is silly. Browsers should protect against this stuff! Opera for example has a much better security model than Firefox.</description>
		<content:encoded><![CDATA[<p>@Boris</p>
<p>I like having sensible discussions but comparing ajax applications to the code sample is silly. Browsers should protect against this stuff! Opera for example has a much better security model than Firefox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1049</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Thu, 10 Jan 2008 07:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1049</guid>
		<description>Gareth, I'm not sure why disagreement with you is automatically classified as trolling.

"you shouldn’t be able to make the browser crash when visiting a web page" would be nice, but in practice it's easy to cause runaway resource usage in all sorts of different ways.  And telling apart runaway resource usage from a resource-intensive webapp involves reading the script author's mind, in general.

Now perhaps browsers should be able to impose CPU/memory quotas on sites.  That's being thought about, but it's not so easy to retrofit onto an existing browser; you really want to design with that in mind.  Sadly, no one did.</description>
		<content:encoded><![CDATA[<p>Gareth, I&#8217;m not sure why disagreement with you is automatically classified as trolling.</p>
<p>&#8220;you shouldn’t be able to make the browser crash when visiting a web page&#8221; would be nice, but in practice it&#8217;s easy to cause runaway resource usage in all sorts of different ways.  And telling apart runaway resource usage from a resource-intensive webapp involves reading the script author&#8217;s mind, in general.</p>
<p>Now perhaps browsers should be able to impose CPU/memory quotas on sites.  That&#8217;s being thought about, but it&#8217;s not so easy to retrofit onto an existing browser; you really want to design with that in mind.  Sadly, no one did.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart Stavenuiter</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1048</link>
		<dc:creator>Bart Stavenuiter</dc:creator>
		<pubDate>Thu, 10 Jan 2008 07:55:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1048</guid>
		<description>I Agree with Gareth here. At least opera doesn't keep eating memory. Both FF 2 and FF3 beta have this problem.</description>
		<content:encoded><![CDATA[<p>I Agree with Gareth here. At least opera doesn&#8217;t keep eating memory. Both FF 2 and FF3 beta have this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1047</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Thu, 10 Jan 2008 02:05:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/2008/01/09/dom-dos-firefox/#comment-1047</guid>
		<description>@Boris

You are talking rubbish, I like to hack things and you shouldn't be able to make the browser crash when visiting a web page. If you don't like what I write then please visit Fox news instead, they should provide you with the "news" you're looking for.

Now please go and troll somewhere else.</description>
		<content:encoded><![CDATA[<p>@Boris</p>
<p>You are talking rubbish, I like to hack things and you shouldn&#8217;t be able to make the browser crash when visiting a web page. If you don&#8217;t like what I write then please visit Fox news instead, they should provide you with the &#8220;news&#8221; you&#8217;re looking for.</p>
<p>Now please go and troll somewhere else.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
