Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3662 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26048 invoked from network); 31 Jul 2003 15:21:19 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.187) by pb1.pair.com with SMTP; 31 Jul 2003 15:21:19 -0000 Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19iFEG-0000F7-00; Thu, 31 Jul 2003 17:20:32 +0200 Received: from [217.160.91.103] (helo=php.net) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19iFEF-000795-00; Thu, 31 Jul 2003 17:20:31 +0200 Message-ID: <3F2933BC.8010401@php.net> Date: Thu, 31 Jul 2003 17:20:28 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030617 X-Accept-Language: de, en MIME-Version: 1.0 To: Rasmus Lerdorf CC: skate , internals@lists.php.net References: <059101bffadb$28a33670$1400000a@fatcuban> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] upload compromises From: hartmut@php.net (Hartmut Holzgraefe) Rasmus Lerdorf wrote: > I suppose we could suck all the code from the UNIX 'file' command into PHP we already have ;) someone at HP already did that for apache and i wrapped it up in ext/mime_magic > The only way to upload a file and then execute it is to know > a little bit about the web server and upload specific file types the web > server is configured to execute. maybe the request was also about client security? (just guessing, hard to tell with no links to the mentioned "bad publicity" in the original message ...) like maybe windows EXE files getting uploaded to galeries? sure, the application storing and providing the uploaded files *should* check that stuff itself, but most probably wont ... :( what about some mechanism similar to your input filtering stuff that operates on uploads so that it becomes possible to enforce sitewide upload policies even in shared hosting environments using some sort of hooks? PS to "skate" : funny that you are worried about php file uploads but not about using the root account for communication ;) -- Hartmut Holzgraefe