Re: RE: (SRADV00001) Arbitrary file disclosure through PHP file upload

From: Date: Mon, 04 Sep 2000 09:22:54 +0000
Subject: Re: RE: (SRADV00001) Arbitrary file disclosure through PHP file upload
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-31905@lists.php.net to get a copy of this message
S1>> <?php S1>> if($userfile_size != filesize($userfile)){ S1>> echo "File upload variables have been tampered with.\n"; S1>> } S1>> S1>> ?> S1>> S1>> This will prevent most attacks, unless the filesize is the same S1>> as the local file. Like I said - workaround.. but it is one you S1>> can impliment in your code *now* instead of waiting for a patch. I fear this is no good. If you need to steal /etc/passwd, you can easily have 1000 tries and get the right size. Since you are not limited in the number of tries, you'll succeed sooner or later. -- Stanislav Malyshev stas@zend.com http://www.zend.com/ +972-3-6139665 ext.106

« previous php.dev (#31905) next »