<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Durable Objects</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/2008/05/24/durable-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:46:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Javascript silo proposals &#171; captain holly java blog</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-589833</link>
		<dc:creator>Javascript silo proposals &#171; captain holly java blog</dc:creator>
		<pubDate>Fri, 26 Mar 2010 03:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-589833</guid>
		<description>[...] This article carries this idea further to create &#8220;Durable&#8221; objects &#8212; objects that, even though they have publicly accessible methods cannot have them switched out by another script. [...]</description>
		<content:encoded><![CDATA[<p>[...] This article carries this idea further to create &#8220;Durable&#8221; objects &#8212; objects that, even though they have publicly accessible methods cannot have them switched out by another script. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas Crockford</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-388074</link>
		<dc:creator>Douglas Crockford</dc:creator>
		<pubDate>Mon, 02 Jun 2008 19:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-388074</guid>
		<description>Billy,

Suppose you have a method C that calls this.A and this.B. If an attacker replaces your methods with his, then C will be compromised. Function C would be vulnerable if it used this.

Rytis,

Inheritance is obtained by calling another durable constructor.

var that = another_constructor();</description>
		<content:encoded><![CDATA[<p>Billy,</p>
<p>Suppose you have a method C that calls this.A and this.B. If an attacker replaces your methods with his, then C will be compromised. Function C would be vulnerable if it used this.</p>
<p>Rytis,</p>
<p>Inheritance is obtained by calling another durable constructor.</p>
<p>var that = another_constructor();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Norton</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-384694</link>
		<dc:creator>James Norton</dc:creator>
		<pubDate>Thu, 29 May 2008 11:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-384694</guid>
		<description>I agree with Billy, what is the difference between what you propose and instantiating an instance of a constructor with private members?</description>
		<content:encoded><![CDATA[<p>I agree with Billy, what is the difference between what you propose and instantiating an instance of a constructor with private members?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rytis Daugirdas</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-384135</link>
		<dc:creator>Rytis Daugirdas</dc:creator>
		<pubDate>Wed, 28 May 2008 16:12:28 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-384135</guid>
		<description>But what about inheritance? How would you inherit properties/methods from another &quot;durable&quot; object?</description>
		<content:encoded><![CDATA[<p>But what about inheritance? How would you inherit properties/methods from another &#8220;durable&#8221; object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy Reisinger</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-384064</link>
		<dc:creator>Billy Reisinger</dc:creator>
		<pubDate>Wed, 28 May 2008 13:24:36 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-384064</guid>
		<description>Douglas, 
What exactly is the difference between what you outlined in the original article, specifically returning &quot;that&quot;, and doing this? 
&lt;code&gt;
var Durable = function() {
   var a = 2;
   var b = 4;
   this.getA = function() {
      return a;
   }
   this.getB = function() {
      return b;
   }
}
&lt;/code&gt;
TIA, 
Billy</description>
		<content:encoded><![CDATA[<p>Douglas,<br />
What exactly is the difference between what you outlined in the original article, specifically returning &#8220;that&#8221;, and doing this?<br />
<code><br />
var Durable = function() {<br />
   var a = 2;<br />
   var b = 4;<br />
   this.getA = function() {<br />
      return a;<br />
   }<br />
   this.getB = function() {<br />
      return b;<br />
   }<br />
}<br />
</code><br />
TIA,<br />
Billy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas Crockford</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-382423</link>
		<dc:creator>Douglas Crockford</dc:creator>
		<pubDate>Sun, 25 May 2008 23:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-382423</guid>
		<description>There are no private methods in the prototype. All members, including all methods, are public.</description>
		<content:encoded><![CDATA[<p>There are no private methods in the prototype. All members, including all methods, are public.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-382419</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sun, 25 May 2008 22:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-382419</guid>
		<description>Is there any mechanism for protecting private methods defined on the prototype of an object?</description>
		<content:encoded><![CDATA[<p>Is there any mechanism for protecting private methods defined on the prototype of an object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joey Hurst</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-382197</link>
		<dc:creator>Joey Hurst</dc:creator>
		<pubDate>Sun, 25 May 2008 15:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-382197</guid>
		<description>Douglas: Thanks for the reply.

Re Kerckhoffs&#039; Principle: definitely agree.

I should have chosen the variable name &quot;secret&quot; more carefully, perhaps calling it &quot;private,&quot; or simply &quot;state.&quot;  The point was that one has to be careful not to expose references to private variables by one means or another, as this will allow a third party to manipulate the durable object&#039;s state directly.  As you mentioned, projects like Caja and ADSafe can address (pun intended) these additional concerns.</description>
		<content:encoded><![CDATA[<p>Douglas: Thanks for the reply.</p>
<p>Re Kerckhoffs&#8217; Principle: definitely agree.</p>
<p>I should have chosen the variable name &#8220;secret&#8221; more carefully, perhaps calling it &#8220;private,&#8221; or simply &#8220;state.&#8221;  The point was that one has to be careful not to expose references to private variables by one means or another, as this will allow a third party to manipulate the durable object&#8217;s state directly.  As you mentioned, projects like Caja and ADSafe can address (pun intended) these additional concerns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas Crockford</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-382180</link>
		<dc:creator>Douglas Crockford</dc:creator>
		<pubDate>Sun, 25 May 2008 15:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-382180</guid>
		<description>Peter,

Your security cannot depend on your global variables if the attacker has access to your global variables, including your global functions and constructors. An attacker can trivially replace your functions with his.

Try your attack under ADsafe. The attacker does not get access to your global durable function. The attacker does not get access to the DOM so he cannot examine the script tags. The attacker does get access to the ADSAFE object which could contain functions that facilitate interwidget communication, including the exchange of durable objects.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Your security cannot depend on your global variables if the attacker has access to your global variables, including your global functions and constructors. An attacker can trivially replace your functions with his.</p>
<p>Try your attack under ADsafe. The attacker does not get access to your global durable function. The attacker does not get access to the DOM so he cannot examine the script tags. The attacker does get access to the ADSAFE object which could contain functions that facilitate interwidget communication, including the exchange of durable objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas Crockford</title>
		<link>http://www.yuiblog.com/blog/2008/05/24/durable-objects/comment-page-1/#comment-382133</link>
		<dc:creator>Douglas Crockford</dc:creator>
		<pubDate>Sun, 25 May 2008 13:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/05/24/durable-objects/#comment-382133</guid>
		<description>The Kerckhoffs&#039;s Principle tells us that we should not be putting secrets in the source of the programs, and we should not be inconvenienced by the enemy reading the source of our programs.</description>
		<content:encoded><![CDATA[<p>The Kerckhoffs&#8217;s Principle tells us that we should not be putting secrets in the source of the programs, and we should not be inconvenienced by the enemy reading the source of our programs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

