Re: uploading files with a single quote in the filename

From: Date: Wed, 23 Feb 2005 22:40:16 +0000
Subject: Re: uploading files with a single quote in the filename
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-209302@lists.php.net to get a copy of this message
Thanks Bret I have tried turning all reporting on - error_reporting(E_ALL); but that doesn't reveal anything significant I have looked in the logs but there is nothing significant there. Because the type is file in the form it is not handled like a post - the values go into an array called $_FILES There seems to be no way to intercept this before the filename gets truncated Thanks again Neil "Bret Hughes" <bhughes@elevating.com> wrote in message news:1109183965.3872.142.camel@bretsony... On Wed, 2005-02-23 at 06:49, neil@jansons.net wrote: > Hi > When uploading files using a type=file in a form, if a file is uploaded with > a single quote the file gets truncated to whatever is after the quote > eg. > blah'sblah.txt > > will be uploaded as > sblah.txt > > Is this a magic quotes issue? > > What is the best way to deal with it? I ran into a similar deal with a textbox and " a while back but I think the issue was sending it back to the browser after the browser sent it up. In the absence of direct help, I would first look to see where the truncation is occurring ie; what is the browser sending? can you post the value and see what your browser is sending it as? is there anything in the logs with error_reporting set to E_ALL? I found trouble shooting the upload process cumbersome since it would fail without any messages but that was before I started setting the error_reporting to also log messages. Not much help but all I got. Bret

« previous php.general (#209302) next »