<?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: Server Side JavaScript Databases Access</title>
	<atom:link href="http://ajaxian.com/archives/server-side-javascript-databases-access/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/server-side-javascript-databases-access</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Sun, 21 Mar 2010 02:12:15 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: crock</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261233</link>
		<dc:creator>crock</dc:creator>
		<pubDate>Sat, 09 Feb 2008 00:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261233</guid>
		<description>SQL is fine in a server, if it is hidden safely behind a tier of some sort. Exposing an SQL interface to the network is inexcusably dangerous. A client service that would make it seem to be a good idea to expose the database to the network will induce good people to do very bad things, as we have seen here. Gears and AIR do this. It is possible to use them well. It is also possible to use them very badly.</description>
		<content:encoded><![CDATA[<p>SQL is fine in a server, if it is hidden safely behind a tier of some sort. Exposing an SQL interface to the network is inexcusably dangerous. A client service that would make it seem to be a good idea to expose the database to the network will induce good people to do very bad things, as we have seen here. Gears and AIR do this. It is possible to use them well. It is also possible to use them very badly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wgyouree</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261223</link>
		<dc:creator>wgyouree</dc:creator>
		<pubDate>Fri, 08 Feb 2008 21:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261223</guid>
		<description>I&#039;m not positive but I think you could execute code from a bookmarklet on a webpage implementing this setup and from that bookmarklet code make SQL queries and updates to the server-side database.  Something such as &quot;DROP TABLE Demo&quot; comes to mind as a statement that could do some damage. That is, if those proxy methods are exposed to the client&#039;s JavaScript runtime.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not positive but I think you could execute code from a bookmarklet on a webpage implementing this setup and from that bookmarklet code make SQL queries and updates to the server-side database.  Something such as &#8220;DROP TABLE Demo&#8221; comes to mind as a statement that could do some damage. That is, if those proxy methods are exposed to the client&#8217;s JavaScript runtime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wgyouree</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261221</link>
		<dc:creator>wgyouree</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261221</guid>
		<description>@balupton and @liming

I think you&#039;ve missed @crock&#039;s point.  He&#039;s not saying using SQL with the Jaxer Server is a problem, he&#039;s saying there is a potential security risk in using a mashup between the client side SQL of Google Gears and the server-side SQL of Jaxer. 

Unless I&#039;m mistaken, doing a &quot;sync&quot; of the server to client side database would create an opportunity for SQL injection attacks on the local database.

&quot;This now allows me to run the addPhrase code from the browser, and it will be proxied up to the server to actually execute that INSERT statement.&quot;  - This seems to indicate that an SQL statement will be executed from the client to the server, creating a potential for an SQL injection attack against the server.

I think the risks could be mitigated (ie, balupton&#039;s managed hooks), but there is an increased potential for a security breach.

I may also have totally misunderstood the situation Dion is describing.  Let me know if I have.</description>
		<content:encoded><![CDATA[<p>@balupton and @liming</p>
<p>I think you&#8217;ve missed @crock&#8217;s point.  He&#8217;s not saying using SQL with the Jaxer Server is a problem, he&#8217;s saying there is a potential security risk in using a mashup between the client side SQL of Google Gears and the server-side SQL of Jaxer. </p>
<p>Unless I&#8217;m mistaken, doing a &#8220;sync&#8221; of the server to client side database would create an opportunity for SQL injection attacks on the local database.</p>
<p>&#8220;This now allows me to run the addPhrase code from the browser, and it will be proxied up to the server to actually execute that INSERT statement.&#8221;  &#8211; This seems to indicate that an SQL statement will be executed from the client to the server, creating a potential for an SQL injection attack against the server.</p>
<p>I think the risks could be mitigated (ie, balupton&#8217;s managed hooks), but there is an increased potential for a security breach.</p>
<p>I may also have totally misunderstood the situation Dion is describing.  Let me know if I have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liming</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261218</link>
		<dc:creator>Liming</dc:creator>
		<pubDate>Fri, 08 Feb 2008 18:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261218</guid>
		<description>agree with balupton. 

Jaxer exposes the sql interface on the server side, not client-side. The snippet above didn&#039;t include , so maybe that&#039;s where the confusion is for a lot of people. 

I suggest ppl try it out first, dig around a bit before scratching the idea all together.</description>
		<content:encoded><![CDATA[<p>agree with balupton. </p>
<p>Jaxer exposes the sql interface on the server side, not client-side. The snippet above didn&#8217;t include , so maybe that&#8217;s where the confusion is for a lot of people. </p>
<p>I suggest ppl try it out first, dig around a bit before scratching the idea all together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: balupton</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261193</link>
		<dc:creator>balupton</dc:creator>
		<pubDate>Fri, 08 Feb 2008 03:08:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261193</guid>
		<description>@crock, that&#039;s the beauty of Jaxer, you can run the SQL interface just server side, it will not be available client side (with the exception of managed hooks whatever, which should be secure if written correctly).</description>
		<content:encoded><![CDATA[<p>@crock, that&#8217;s the beauty of Jaxer, you can run the SQL interface just server side, it will not be available client side (with the exception of managed hooks whatever, which should be secure if written correctly).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crock</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261180</link>
		<dc:creator>crock</dc:creator>
		<pubDate>Thu, 07 Feb 2008 14:45:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261180</guid>
		<description>When the Gears team announced that they where using SQLite for persistence, I tried to warn them that it would be an attractive nuisance. I warned them that having a client-side SQL interface would induce some idiot into exposing a server-side SQL interface in the interest of saving a little bit of effort. The obvious problem is that exposing SQL to the net is extremely dangerous because of XSS and other attacks. It puts too much authority into the hands of the attackers.

I never imagined that that idiot would be you.</description>
		<content:encoded><![CDATA[<p>When the Gears team announced that they where using SQLite for persistence, I tried to warn them that it would be an attractive nuisance. I warned them that having a client-side SQL interface would induce some idiot into exposing a server-side SQL interface in the interest of saving a little bit of effort. The obvious problem is that exposing SQL to the net is extremely dangerous because of XSS and other attacks. It puts too much authority into the hands of the attackers.</p>
<p>I never imagined that that idiot would be you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: balupton</title>
		<link>http://ajaxian.com/archives/server-side-javascript-databases-access/comment-page-1#comment-261167</link>
		<dc:creator>balupton</dc:creator>
		<pubDate>Wed, 06 Feb 2008 16:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3303#comment-261167</guid>
		<description>Great work. I think Jaxer is quite a step in the right direction. Although I see it more used for DOM modification than server-side actions. So use it as for a templating system, by having one template system that runs server and client side, you can have a data.php that retrieves all the data, and a template.php that retrieves a single template (say for a search result) which is then populated by the many rows of data, reducing bandwidth, and providing quite the web 2.0 experience. So with jaxer, if the user does not have js enabled, the [same] template system will just run server side instead. The implementation I am eyeing is: http://code.google.com/p/jsmarty/ although it still needs some work...</description>
		<content:encoded><![CDATA[<p>Great work. I think Jaxer is quite a step in the right direction. Although I see it more used for DOM modification than server-side actions. So use it as for a templating system, by having one template system that runs server and client side, you can have a data.php that retrieves all the data, and a template.php that retrieves a single template (say for a search result) which is then populated by the many rows of data, reducing bandwidth, and providing quite the web 2.0 experience. So with jaxer, if the user does not have js enabled, the [same] template system will just run server side instead. The implementation I am eyeing is: <a href="http://code.google.com/p/jsmarty/" rel="nofollow">http://code.google.com/p/jsmarty/</a> although it still needs some work&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
