<?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: Remote JSON - JSONP</title>
	<atom:link href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/feed/" rel="self" type="application/rss+xml" />
	<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/</link>
	<description>Bob's Rants</description>
	<pubDate>Sat, 17 May 2008 15:23:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-11069</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Mon, 04 Jun 2007 21:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-11069</guid>
		<description>No, it's completely different than the XSRF hole in gmail.

Even if it was, the whole point of JSONP is cross-site requests anyway... so it's not really forgery nor a hole.</description>
		<content:encoded><![CDATA[<p>No, it&#8217;s completely different than the XSRF hole in gmail.</p>
<p>Even if it was, the whole point of JSONP is cross-site requests anyway&#8230; so it&#8217;s not really forgery nor a hole.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kishore Senji</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-11066</link>
		<dc:creator>Kishore Senji</dc:creator>
		<pubDate>Mon, 04 Jun 2007 20:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-11066</guid>
		<description>While the call back param option is really nice, we need to be really careful while operating of sensitive JSON data for mash-ups. This is exactly what caused the gmail contact list XSRF hole. Isn't it? http://jeremiahgrossman.blogspot.com/2007/01/gmail-xsrf-json-call-back-hackery.html</description>
		<content:encoded><![CDATA[<p>While the call back param option is really nice, we need to be really careful while operating of sensitive JSON data for mash-ups. This is exactly what caused the gmail contact list XSRF hole. Isn&#8217;t it? <a href="http://jeremiahgrossman.blogspot.com/2007/01/gmail-xsrf-json-call-back-hackery.html" rel="nofollow">http://jeremiahgrossman.blogspot.com/2007/01/gmail-xsrf-json-call-back-hackery.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan Sundström</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-4951</link>
		<dc:creator>Johan Sundström</dc:creator>
		<pubDate>Mon, 12 Feb 2007 13:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-4951</guid>
		<description>Completely unmoderated javascript code injection (providing code containing any characters) is not a good idea, but what level of restraint would be? There is call some level of callback layout restrictions, and I would like to standardize a good practice, which is also ideally trivial to implement for JSONP providers.

Forbidding parentheses goes a long way, but it still allows you to steal document.cookie by storing it in a variable. Forbidding = too slightly harms the most trivial JSONP consumption model (callback "my_variable="). Yahoo seems to have set the bar for themselves on limiting to US-ASCII alphanumerics, underscore, period and square brackets. There is some merit to that; for one thing it skips scenarios with unbalanced quotation marks in the callback name. The outcome is at least useful enough.

I would find it useful if JSONP appeared as an informal standard (IETF RFC, informational, for instance), stating good practices, conformance criteria, and so on, simply to have a document to refer implementors and service providers to, without forcing a high level of understanding of the domain on them. I think I more or less volunteer to writing it, but I would like you to be on board, so to speak, as inventor, originator or similar, even if you do not pull the actual weight.

It would mostly be something to cover up the hole until Crockford's JSONRequest is somewhere near as deployed as XMLHttpRequest is today, but that will take some time, and JSONP works now. It could just use a little help along the way, here and there.</description>
		<content:encoded><![CDATA[<p>Completely unmoderated javascript code injection (providing code containing any characters) is not a good idea, but what level of restraint would be? There is call some level of callback layout restrictions, and I would like to standardize a good practice, which is also ideally trivial to implement for JSONP providers.</p>
<p>Forbidding parentheses goes a long way, but it still allows you to steal document.cookie by storing it in a variable. Forbidding = too slightly harms the most trivial JSONP consumption model (callback &#8220;my_variable=&#8221;). Yahoo seems to have set the bar for themselves on limiting to US-ASCII alphanumerics, underscore, period and square brackets. There is some merit to that; for one thing it skips scenarios with unbalanced quotation marks in the callback name. The outcome is at least useful enough.</p>
<p>I would find it useful if JSONP appeared as an informal standard (IETF RFC, informational, for instance), stating good practices, conformance criteria, and so on, simply to have a document to refer implementors and service providers to, without forcing a high level of understanding of the domain on them. I think I more or less volunteer to writing it, but I would like you to be on board, so to speak, as inventor, originator or similar, even if you do not pull the actual weight.</p>
<p>It would mostly be something to cover up the hole until Crockford&#8217;s JSONRequest is somewhere near as deployed as XMLHttpRequest is today, but that will take some time, and JSONP works now. It could just use a little help along the way, here and there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-3818</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Wed, 07 Jun 2006 21:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-3818</guid>
		<description>It's a new API, that del.icio.us does not support. It was a hypothetical example.

The point of the parentheses is that it's not valid JavaScript without them, and you need valid JavaScript for a script tag. XMLHttpRequest is irrelevant, because you would use regular JSON for that.

I think you're confused about the security implications. It's definitely not an attack vector for the server because all it does is concatenate strings. If there's already malicious code on the client, this is totally irrelevant.

The only attack vector is stealing cookies from the JSONP-hosting server, which is why yahoo's version doesn't allow anything but a single identifier to be used as the callback.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a new API, that del.icio.us does not support. It was a hypothetical example.</p>
<p>The point of the parentheses is that it&#8217;s not valid JavaScript without them, and you need valid JavaScript for a script tag. XMLHttpRequest is irrelevant, because you would use regular JSON for that.</p>
<p>I think you&#8217;re confused about the security implications. It&#8217;s definitely not an attack vector for the server because all it does is concatenate strings. If there&#8217;s already malicious code on the client, this is totally irrelevant.</p>
<p>The only attack vector is stealing cookies from the JSONP-hosting server, which is why yahoo&#8217;s version doesn&#8217;t allow anything but a single identifier to be used as the callback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-3817</link>
		<dc:creator>Evan</dc:creator>
		<pubDate>Wed, 07 Jun 2006 18:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-3817</guid>
		<description>I am not completely clear about this. How does it stay compatible with existing APIs? You seem to use it with del.icio.us without any updates. 

And the point of the parentheses is so that the same API can be called via regular XMLHttpRequest, and the data saved via assignment, or from an offsite page via a script tag, and the data saved via the callback? I guess the parentheses is the thing I really don't get. 

Would it not be more safe to have the server call a pre-defined function name only? I am thinking about a situation where an attacker embeds some malicious call-back code in a GET url and includes it in an image tag or something like that. Maybe this is no different than including any old offsite .js file.

Anyway...</description>
		<content:encoded><![CDATA[<p>I am not completely clear about this. How does it stay compatible with existing APIs? You seem to use it with del.icio.us without any updates. </p>
<p>And the point of the parentheses is so that the same API can be called via regular XMLHttpRequest, and the data saved via assignment, or from an offsite page via a script tag, and the data saved via the callback? I guess the parentheses is the thing I really don&#8217;t get. </p>
<p>Would it not be more safe to have the server call a pre-defined function name only? I am thinking about a situation where an attacker embeds some malicious call-back code in a GET url and includes it in an image tag or something like that. Maybe this is no different than including any old offsite .js file.</p>
<p>Anyway&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-3808</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Fri, 26 May 2006 19:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-3808</guid>
		<description>Yes, of course it is possible to build a proxy.</description>
		<content:encoded><![CDATA[<p>Yes, of course it is possible to build a proxy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicolas rolland</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-3806</link>
		<dc:creator>nicolas rolland</dc:creator>
		<pubDate>Fri, 26 May 2006 16:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-3806</guid>
		<description>This is a much needed feature.

I was looking at ways to integrate my del.icio.us (which has some JSON support) categories in my blogger blog, and I had the exact same idea.

Now being a beginner in JS, I have what might be a stupid question : isn't it possible to build a bridge server that supports JSONP and forward the JSON calls?

regards,
nicolas rolland
http://technofinance.blogspot.com</description>
		<content:encoded><![CDATA[<p>This is a much needed feature.</p>
<p>I was looking at ways to integrate my del.icio.us (which has some JSON support) categories in my blogger blog, and I had the exact same idea.</p>
<p>Now being a beginner in JS, I have what might be a stupid question : isn&#8217;t it possible to build a bridge server that supports JSONP and forward the JSON calls?</p>
<p>regards,<br />
nicolas rolland<br />
<a href="http://technofinance.blogspot.com" rel="nofollow">http://technofinance.blogspot.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Nowack</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-2815</link>
		<dc:creator>Benjamin Nowack</dc:creator>
		<pubDate>Mon, 20 Feb 2006 17:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-2815</guid>
		<description>I like the idea very much, just added support for it to an RDF store (http://www.appmosphere.com/en-arc_rdf_store).

cheers,
bnj</description>
		<content:encoded><![CDATA[<p>I like the idea very much, just added support for it to an RDF store (http://www.appmosphere.com/en-arc_rdf_store).</p>
<p>cheers,<br />
bnj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike chambers</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-2775</link>
		<dc:creator>mike chambers</dc:creator>
		<pubDate>Thu, 12 Jan 2006 19:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-2775</guid>
		<description>You describe ActionScript (the development language used for the Flash VM as:

&#62;a one-off moving target programming langage

Just an fyi, but ActionScript is based on ECMA script. The current version is not 100% compatible (although very close). The next version aims to be 100% compatible with the next version of ECMA script.

Just an fyi...

mike chambers

mesh@adobe.com</description>
		<content:encoded><![CDATA[<p>You describe ActionScript (the development language used for the Flash VM as:</p>
<p>&gt;a one-off moving target programming langage</p>
<p>Just an fyi, but ActionScript is based on ECMA script. The current version is not 100% compatible (although very close). The next version aims to be 100% compatible with the next version of ECMA script.</p>
<p>Just an fyi&#8230;</p>
<p>mike chambers</p>
<p><a href="mailto:mesh@adobe.com">mesh@adobe.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/#comment-2741</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Tue, 27 Dec 2005 02:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/?p=188#comment-2741</guid>
		<description>The callback implementation that Yahoo! deployed is *almost* JSONP, but not quite.  The difference is that callback filters out anything past the first identifier given in callback, so you don't have the opportunity to throw in an "del.icio.us style" assignment.  Originally I had thought to do exactly what Yahoo! did, but I didn't see a reason not to just let arbitrary text get prepended because it allows for compatibillity with legacy API, and simplicity in some situations.</description>
		<content:encoded><![CDATA[<p>The callback implementation that Yahoo! deployed is *almost* JSONP, but not quite.  The difference is that callback filters out anything past the first identifier given in callback, so you don&#8217;t have the opportunity to throw in an &#8220;del.icio.us style&#8221; assignment.  Originally I had thought to do exactly what Yahoo! did, but I didn&#8217;t see a reason not to just let arbitrary text get prepended because it allows for compatibillity with legacy API, and simplicity in some situations.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
