Edit report at https://bugs.php.net/bug.php?id=31398&edit=1

 ID:                 31398
 Comment by:         ecolora at gmail dot com
 Reported by:        lobo235 at gmail dot com
 Summary:            File Upload Original name problem with
                     magic_quotes_gpc = On
 Status:             Closed
 Type:               Bug
 Package:            *Web Server problem
 Operating System:   Windows and Linux
 PHP Version:        4CVS-2005-01-04 (stable)
 Block user comment: N
 Private report:     N

 New Comment:

See here how to correct the problem:
http://ecolora.ru/index.php/2010-07-09-03-51-16/veb-dizajn-i-programmirovanie/868-kak-iz-files-poluchit-celoe-imja-fajla-s-kavychkoj


Previous Comments:
------------------------------------------------------------------------
[2005-01-20 18:57:46] il...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2005-01-11 13:03:40] fsolinas at it dot tiscali dot com

I've been able to reproduce this bug on PHP 4.3.10 with
magic_quotes_gpc = On.
It's *not* reproducible turning off magic_quotes_gpc,
because the array element containing the (original) file
name is preserved "intact" this way.

This bug seems to have been introduced in 4.3.10, and breaks
many document management systems that rely on
$_FILES['userfile']['name'] as the name of the file
uploaded, definitely forcing users to *not* use single
quotes in filename.

Do you plan to write a patch to fix this behaviour?

------------------------------------------------------------------------
[2005-01-05 16:18:51] lobo235 at gmail dot com

It may be only PHP4 specific, I do remember it working at one point though 
using PHP4 a couple of months ago. I had written a file upload script for one 
of my sites and I remember testing to see what types of filenames it would 
support and the apostrophes worked fine then. It wasn't until just recently 
that my host upgraded to 4.3.10 that I started to notice the problem, now my 
script does not work as it used to.

------------------------------------------------------------------------
[2005-01-05 10:11:50] vr...@php.net

I can't reproduce this on PHP 5.0.2 with php.ini-dist, Apache 2 and Windows. 
"lobo235's fam.jpg" becomes "lobo235\'s fam.jpg" or "lobo235's fam.jpg" with 
magic_quotes_gpc=Off.

Maybe it's PHP 4 specific.

------------------------------------------------------------------------
[2005-01-05 09:03:22] der...@php.net

Yeah, I agree... the documentation should mention this issue.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=31398


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=31398&edit=1

Reply via email to