<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Farvour&#039;s Blog &#187; Programming</title>
	<atom:link href="http://farvour.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://farvour.com</link>
	<description>Random Ramblings and Such</description>
	<lastBuildDate>Sun, 25 Oct 2009 00:17:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Replicating the Google Chrome Facebook Crash Bug</title>
		<link>http://farvour.com/2009/08/27/replicating-the-google-chrome-facebook-crash-bug/</link>
		<comments>http://farvour.com/2009/08/27/replicating-the-google-chrome-facebook-crash-bug/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 22:09:57 +0000</pubDate>
		<dc:creator>farvour</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://farvour.com/?p=61</guid>
		<description><![CDATA[Ok, so a couple of a weeks ago I had started using Google Chrome regularly. It really is a nice, fast, stable browser &#8230; well, stable until you use Facebook a lot.
Chrome would crash any time I&#8217;d finish typing out a really long comment on a wall, or a wall post anywhere for that matter, [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so a couple of a weeks ago I had started using Google Chrome regularly. It really is a nice, fast, stable browser &#8230; well, stable until you use Facebook a lot.</p>
<p>Chrome would crash any time I&#8217;d finish typing out a really long comment on a wall, or a wall post anywhere for that matter, and then try to strike the &#8220;Comment&#8221; button. I could not figure out why the browser crashes when doing this. Finally it happened to me again today, and I noticed a pattern. It only seemed to happen when I clicked off the text editor onto a <strong>specific</strong> area elsewhere on the page. Basically I was missing the comment button itself, but barely.</p>
<p>Here&#8217;s a step by step example of how to reproduce the Facebook Google Chrome crash bug:</p>
<p>1.) Begin by clicking the Comment link on any status you desire (or wall post on a group page, etc)</p>
<p><img class="alignnone size-full wp-image-74" title="Facebook Chrome Crash Replication Step 1" src="http://farvour.com/wp-content/uploads/2009/08/fb_chrome_crash_step_1.png" alt="Facebook Chrome Crash Replication Step 1" width="630" height="717" /></p>
<p>2.) Type something, or leave the field blank, and attempt to click in any of the &#8220;forbidden areas&#8221; highlighted in the second image below. Doing so will cause the current Google Chrome browser tab to crash.</p>
<p><img class="alignnone size-full wp-image-75" title="Facebook Chrome Crash Replication Step 2" src="http://farvour.com/wp-content/uploads/2009/08/fb_chrome_crash_step_2.png" alt="Facebook Chrome Crash Replication Step 2" width="643" height="719" /></p>
<p>So there you have it, a replicatable crash that can be submitted to the Google Chrome team. Please note, I am using the latest stable Chrome version <strong>2.0.172.39</strong> as of this writing. I hope the Facebook team can address this issue. While it may seem minor, accidents happen and sometimes you aren&#8217;t always able to strike the &#8220;Comment&#8221; button <em><strong>100%</strong></em> of the time and it&#8217;s quite a disaster when an entire 40 sentence wall post basically needs to be re-typed. I hope the Facebook team will look into this issue and that this blog has provided useful information to the community.</p>
<p>Best Regards!</p>
]]></content:encoded>
			<wfw:commentRss>http://farvour.com/2009/08/27/replicating-the-google-chrome-facebook-crash-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL Injection attacks are always fun (not)</title>
		<link>http://farvour.com/2009/07/07/mysql-injection-attacks-are-always-fun-not/</link>
		<comments>http://farvour.com/2009/07/07/mysql-injection-attacks-are-always-fun-not/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 17:50:03 +0000</pubDate>
		<dc:creator>farvour</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[injection]]></category>

		<guid isPermaLink="false">http://farvour.com/?p=12</guid>
		<description><![CDATA[So I am working today and receive an e-mail from the boss man about one of our clients websites getting &#8220;hacked&#8221; by a Palestinian hacking group. Apparently they used some MySQL query injections on one of our old sites. Gotta love legacy code. Well the site wasn&#8217;t escaping the strings properly passed from the URL [...]]]></description>
			<content:encoded><![CDATA[<p>So I am working today and receive an e-mail from the boss man about one of our clients websites getting &#8220;hacked&#8221; by a Palestinian hacking group. Apparently they used some MySQL query injections on one of our old sites. Gotta love legacy code. Well the site wasn&#8217;t escaping the strings properly passed from the URL GET or the POST variables and they managed to reset the admin section usernames and passwords. They then proceeded to log into the admin interface for the site and upload a &#8220;Your site has been haxX0red!!!&#8221; image. Lovely.</p>
<p>In either case, the solution is to properly re-write your SQL queries as to not leave a gaping hole if someone decides to pass non-typical form data to the script. The following code is bad:</p>
<p><code>// username and password sent from signup form<br />
$myusername=$_POST['myusername'];<br />
$mypassword=$_POST['mypassword'];<br />
$sql="SELECT * FROM members WHERE username='$myusername' and password='$mypassword'";<br />
$result=mysql_query($sql);</code></p>
<p>So I guess it&#8217;s another handful of old sites to fix since a bunch of others are using the same code. <strong>/sigh/</strong> The correct way this code <em>should </em>have been written:</p>
<p><code>// username and password sent from signup form<br />
$myusername=mysql_escape_string($_POST['myusername']);<br />
$mypassword=mysql_escape_string($_POST['mypassword']);<br />
$sql="SELECT * FROM members WHERE username='$myusername' and password='$mypassword'";<br />
$result=mysql_query($sql);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://farvour.com/2009/07/07/mysql-injection-attacks-are-always-fun-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
