<?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"
	>
<channel>
	<title>Comments on: Secure downloads</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/</link>
	<description></description>
	<pubDate>Mon, 08 Sep 2008 15:02:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: John</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8746</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8746</guid>
		<description>Dont suppose it would be possible to get this code I am trying to do something similar but am new to php etc.I want clients to be able to download a file after they have gone through an order process.

would this work or does anyone know of a script that would.

Thanks John
</description>
		<content:encoded><![CDATA[<p>Dont suppose it would be possible to get this code I am trying to do something similar but am new to php etc.I want clients to be able to download a file after they have gone through an order process.</p>
<p>would this work or does anyone know of a script that would.</p>
<p>Thanks John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hadley</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8745</link>
		<dc:creator>Hadley</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8745</guid>
		<description>It's fairly easily to fake a referrer.  How does your server know what page I last visited?  The browser I'm using sends a http referer header saying where I came from.  Obviously the browser doesn't need to tell the truth.

I think a more secure way would be thave an array of downloadable files, and then specify numerically which one to download.

Hadley</description>
		<content:encoded><![CDATA[<p>It&#8217;s fairly easily to fake a referrer.  How does your server know what page I last visited?  The browser I&#8217;m using sends a http referer header saying where I came from.  Obviously the browser doesn&#8217;t need to tell the truth.</p>
<p>I think a more secure way would be thave an array of downloadable files, and then specify numerically which one to download.</p>
<p>Hadley</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8744</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8744</guid>
		<description>actually - since it's checking for the referrer first - how would this even be possible? How does one "fake" a referrer?</description>
		<content:encoded><![CDATA[<p>actually - since it&#8217;s checking for the referrer first - how would this even be possible? How does one &#8220;fake&#8221; a referrer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8743</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8743</guid>
		<description>Ahh.. good point.
Would you just strip them out? (therefore causing the hack to just have an error?)
or if they're in there, it means it's a hack attempt - so just forward the person out to someother page...?</description>
		<content:encoded><![CDATA[<p>Ahh.. good point.<br />
Would you just strip them out? (therefore causing the hack to just have an error?)<br />
or if they&#8217;re in there, it means it&#8217;s a hack attempt - so just forward the person out to someother page&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason D-</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8742</link>
		<dc:creator>Jason D-</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8742</guid>
		<description>What you need to parse for in the requested file var is .. since someone could post a link in any dynamically generated portion of the site to circumvent the referer check and start traversing the tree on the server and picking up different important OS files and having them sent to them. In the example code you have I could post

../../../../etc/passwd as my requested download and have it send me your passwd file and see who's got login accounts on your box and start attacking them.</description>
		<content:encoded><![CDATA[<p>What you need to parse for in the requested file var is .. since someone could post a link in any dynamically generated portion of the site to circumvent the referer check and start traversing the tree on the server and picking up different important OS files and having them sent to them. In the example code you have I could post</p>
<p>../../../../etc/passwd as my requested download and have it send me your passwd file and see who&#8217;s got login accounts on your box and start attacking them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayant</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8741</link>
		<dc:creator>Jayant</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8741</guid>
		<description>In that case you can have added security by not disclosing the filename
as in
header("Content-Disposition: attachment; filename=&#92;"&#36;p&#92;"");

instead have
//
code here to get only the file extension of &#36;p
stored in &#36;ext
//
header("Content-Disposition: attachment; filename=&#92;"".rand().".&#36;ext&#92;"");

make sure you do srand() with timestamp, to generate a unique random number each time. they will think the file name as this :)</description>
		<content:encoded><![CDATA[<p>In that case you can have added security by not disclosing the filename<br />
as in<br />
header(&#8221;Content-Disposition: attachment; filename=&#92;&#8221;&#36;p&#92;&#8221;");</p>
<p>instead have<br />
//<br />
code here to get only the file extension of &#36;p<br />
stored in &#36;ext<br />
//<br />
header(&#8221;Content-Disposition: attachment; filename=&#92;&#8221;".rand().&#8221;.&#36;ext&#92;&#8221;");</p>
<p>make sure you do srand() with timestamp, to generate a unique random number each time. they will think the file name as this <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8740</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8740</guid>
		<description>The problem(s) I had (that's really what the solution above is for) was a) it was on a windows server b) the downloads had to be purchased first/were for customers only.</description>
		<content:encoded><![CDATA[<p>The problem(s) I had (that&#8217;s really what the solution above is for) was a) it was on a windows server b) the downloads had to be purchased first/were for customers only.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayant</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8739</link>
		<dc:creator>Jayant</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8739</guid>
		<description>You can also protect files (from non referers) using the process of hot-linking, requires apache.

This can apply to all images (image protection), direct linking to pages/files you dont want ppl to directly link</description>
		<content:encoded><![CDATA[<p>You can also protect files (from non referers) using the process of hot-linking, requires apache.</p>
<p>This can apply to all images (image protection), direct linking to pages/files you dont want ppl to directly link</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8738</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/12/12/secure-downloads/#comment-8738</guid>
		<description>If anyone needs it - I can "clean up" this code so it's usable to more than just me. ;) Let me know...</description>
		<content:encoded><![CDATA[<p>If anyone needs it - I can &#8220;clean up&#8221; this code so it&#8217;s usable to more than just me. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> Let me know&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.293 seconds -->
