Re: Problems downloading a PDF

From: Date: Wed, 04 Apr 2007 12:48:07 +0000
Subject: Re: Problems downloading a PDF
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-252031@lists.php.net to get a copy of this message
Jochem Maas wrote:
You don't need to basename() it, you already know what the filename is, because it was requested via $_GET['file'].
I would say almost the opposite:
Let me rephrase: if you are properly validating the $_GET['file'] input anyway, basenaming it is a superfluous step that may hide possible attack attempts. Personally, I'd rather know if someone was messing around with a parameter. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window"

« previous php.general (#252031) next »