<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #1057: JSONP parameter isn't escaped</title>
    <link>http://localhost/ticket/1057</link>
    <description>&lt;pre class="wiki"&gt;$ curl "http://127.0.0.1:5000/api/rest/package/annakarenina?callback=&amp;lt;script&amp;gt;jsoncallback"
&lt;/pre&gt;&lt;p&gt;
gives:
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;script&amp;gt;jsoncallback({"id": "c10ebd31-5b45-4f6f-885d-dca9b18caec4", "name": "annakarenina", "title": "A Novel By Tolstoy",
&lt;/pre&gt;&lt;p&gt;
which could run script code in the client who made the call.
&lt;/p&gt;
&lt;p&gt;
One idea for filtering: &lt;a class="ext-link" href="http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html&lt;/a&gt;
Maybe just better to have a restricted whitelist of characters to be even more sure.
&lt;/p&gt;
&lt;p&gt;
Same as: &lt;a class="ext-link" href="https://trac.dataco.coi.gov.uk/projects/datagov/ticket/906"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://trac.dataco.coi.gov.uk/projects/datagov/ticket/906&lt;/a&gt;
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/1057</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Mon, 13 Feb 2012 16:23:56 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/1057#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/1057#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
fixed in commit 3d7cbf0
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>