Re: [HTTP_Download] : Security and MIME types

From: Date: Tue, 16 Nov 2004 09:19:14 +0000
Subject: Re: [HTTP_Download] : Security and MIME types
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15556@lists.php.net to get a copy of this message
Hi Mos, you wrote: > I use HTTP_Download apckage to set up a feature to download some > files. > > Is reasonnable to set-up the 'contenttype' parameter in the > staticSend function ? Yes IMO. You could also use HTTP_Download::guessContentType() which utilizes ext/mime_magic by setting the second parameter of staticSend() to true. > I mean to set tup this parameter (with Windows OS) I should guess it > with the 3 last characters of the filename. But this extension can be > changed by the users before uploading the file (the files to download > can be upload by users in a previous process). Well, then you're a step "behind". The security risk here already is that (untrusted?) users may upload files that other users can download. Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.general (#15556) next »