<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developer.myspace.com/Community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>makeRequest</title><link>http://developer.myspace.com/Community/forums/30.aspx</link><description>Questions related to the OpenSocial makeRequest function and our proxy.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20910.1126)</generator><item><title>Re: Protecting your URLs that return data</title><link>http://developer.myspace.com/Community/forums/thread/41984.aspx</link><pubDate>Thu, 02 Jul 2009 05:51:57 GMT</pubDate><guid isPermaLink="false">8e485011-333f-425c-b84a-1febdb8bfab0:41984</guid><dc:creator>Michael</dc:creator><slash:comments>0</slash:comments><comments>http://developer.myspace.com/Community/forums/thread/41984.aspx</comments><wfw:commentRss>http://developer.myspace.com/Community/forums/commentrss.aspx?SectionID=30&amp;PostID=41984</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;cool, this may be useful to me also, because i dont want people storing and deleting data from my database directly from the site that accesses it, but i need to know how it works so i can impement it =D thanks a lot &lt;/p&gt;</description></item><item><title>Re: Protecting your URLs that return data</title><link>http://developer.myspace.com/Community/forums/thread/40942.aspx</link><pubDate>Sun, 31 May 2009 15:47:53 GMT</pubDate><guid isPermaLink="false">8e485011-333f-425c-b84a-1febdb8bfab0:40942</guid><dc:creator>Chak</dc:creator><slash:comments>0</slash:comments><comments>http://developer.myspace.com/Community/forums/thread/40942.aspx</comments><wfw:commentRss>http://developer.myspace.com/Community/forums/commentrss.aspx?SectionID=30&amp;PostID=40942</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Thomas:&lt;/p&gt;&lt;p&gt;You need to use signed makerequest() calls to address this issue which will pass a signature your server.&lt;/p&gt;&lt;p&gt;You also need to modify your server code to verify the signature passed in to ensure they match (i.e. this will validate that the request originated from Myspace - assuming the consumer secret has not been compromised).&lt;/p&gt;&lt;p&gt;Please add the following line to the JS code above to make signed requests: &lt;br /&gt;&lt;/p&gt;&lt;pre class="source-javascript"&gt;&lt;b&gt;params&lt;span class="br0"&gt;[&lt;/span&gt;gadgets.&lt;span class="me1"&gt;io&lt;/span&gt;.&lt;span class="me1"&gt;RequestParameters&lt;/span&gt;.&lt;span class="me1"&gt;AUTHORIZATION&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; gadgets.&lt;span class="me1"&gt;io&lt;/span&gt;.&lt;span class="me1"&gt;AuthorizationType&lt;/span&gt;.&lt;span class="me1"&gt;SIGNED&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;p&gt;Chak&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="source-javascript"&gt;&amp;nbsp;  &lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Protecting your URLs that return data</title><link>http://developer.myspace.com/Community/forums/thread/40895.aspx</link><pubDate>Fri, 29 May 2009 22:10:48 GMT</pubDate><guid isPermaLink="false">8e485011-333f-425c-b84a-1febdb8bfab0:40895</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><comments>http://developer.myspace.com/Community/forums/thread/40895.aspx</comments><wfw:commentRss>http://developer.myspace.com/Community/forums/commentrss.aspx?SectionID=30&amp;PostID=40895</wfw:commentRss><description>When requesting data from our webserver using the opensocial API call makeRequest, we can either post or get data using the code below&lt;br /&gt;&lt;br /&gt;&lt;i&gt;function getFriendList() {&lt;br /&gt;var url = &amp;#39;http://apps.yo.com/widgets/send_item/opensocial/profile_summary?user_id=&amp;#39; + gViewer.getId();&lt;br /&gt;var params = {};&lt;br /&gt;params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;&lt;br /&gt;gadgets.io.makeRequest(url, getFriendListCallback, params);&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As we can see, looking at the source of our page anyone can use the url to create they&amp;#39;re own apps.&lt;br /&gt;&lt;br /&gt;I can use &lt;i&gt;$referrer = $_SERVER[&amp;#39;HTTP_REFERER&amp;#39;];&lt;/i&gt; in PHP to know the request is coming from MySpace and so block any requests from other domains.&lt;br /&gt;&lt;br /&gt;But what is there to stop another MySpace Dev from creating an application that uses my webserver?&lt;br /&gt;</description></item></channel></rss>