<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.ssbits.com/home/</link>
		<atom:link href="http://www.ssbits.com/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_297</link>
			<description>@hamish: Yes, that's a nice convention, but personally I don't like holding variables I'm not going to use. So if the raw var is solely used to be converted to a safe var, then I dont keep it.

@greg: This graphic isn't mine or SSBits'. Its a very well known comic from XKCD: http://xkcd.com/327/ (which really should be credited), so here is the credit!</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_297</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_296</link>
			<description>Hey, I found this graphic being used on a related article on Smashing Magazine. Check it out @ http://www.smashingmagazine.com/2011/01/11/keeping-web-users-safe-by-sanitizing-input-data/</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_296</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_93</link>
			<description>A handy convention - from the SilverStripe core and elsewhere - suffix variables that you might use for database lookups with with &quot;_RAW&quot; (pre-converted) or &quot;_SQL&quot; (SQL safe) to remind you what is safe to use and what isn't. 
Eg:
$id_RAW = Director::urlParam('ID');
$id_SQL = Convert::raw2sql($id_RAW);

Casting to an expected data type can be a convenient short cut. Ie, this is a convenient short cut for getting objects by ID (since an ID of zero will never find an object):

$obj = DataObject::get_by_id(&quot;SomeObject&quot;, (int)Director::urlParam('ID'));

</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2010/securing-your-site/#PageComment_93</guid>
		</item>
		

	</channel>
</rss>