Re: uploading files with a single quote in the filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brett

My form is effectively identical to yours
<form enctype="multipart/form-data" action="/uploadfiles.php" method="post">
<b>Upload a file:</b> <input name="userfile" type="file" size="100">

No the first part of the file name is just dropped and the file with the
truncated name is saved in the correct place.

But with it escaping the quote do you mean that you end up with a file with
\ in it? That would be an illegal filename.

Neil

"Bret Hughes" <bhughes@xxxxxxxxxxxxx> wrote in message
news:1109205176.3872.265.camel@xxxxxxxxxxx
On Wed, 2005-02-23 at 16:40, neil@xxxxxxxxxxx wrote:
> 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
>


Well for another data point when I uploaded a file using our upload form
the ' gets escaped on both IE6 (win98 running in win4lin) and galeon.

test's qoutes.jpg becomes test\'s quotes.jpg on a fedora server with
apache and php of course.

I don't suppose the file gets put into a directory named with the first
portion of the file?

FWIW here is what my form tag looks like

 <form enctype="multipart/form-data" action="uploadFiles.php"
method="POST">

and the filechooser

 <input name="userfile" type="file" >

Bret

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux