php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40938 BUG #38263 (Binary data corrupted on multipart form-data) still exists (4.4.x)
Submitted: 2007-03-28 17:51 UTC Modified: 2008-07-11 21:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ass3mbler at gmail dot com Assigned: iliaa (profile)
Status: Wont fix Package: HTTP related
PHP Version: 4.4.6 OS: Linux Gentoo 2.6.x
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 + 27 = ?
Subscribe to this entry?

 
 [2007-03-28 17:51 UTC] ass3mbler at gmail dot com
Description:
------------
The BUG #38236(http://bugs.php.net/bug.php?id=38236),correctly addressed and fixed in the PHP 5.x codebase, is still present in the PHP 4.4.x codebase. I've tested and reproduced the same problem with many installations ranging from PHP 4.4.0 to PHP 4.4.6 included. 
I've used the relevant patches from iliaa for the files:
/main/php_variables.c (http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.127&r2=1.128

/main/rfc1867.c
(http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.186&r2=1.187)

adapting them for the 4.4.x codebase, and they seems to work correctly. The patches are available here: 
patch for php_variables.c => http://www.box.net/shared/akyjqyq55s
patch for rfc1867.c => http://www.box.net/shared/2ime21vb4j

Reproduce code:
---------------
Same as BUG #38236(http://bugs.php.net/bug.php?id=38236)

Expected result:
----------------
BUG #38236(http://bugs.php.net/bug.php?id=38236)

Actual result:
--------------
BUG #38236(http://bugs.php.net/bug.php?id=38236). Seems fixed applying the attached patches

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-13 14:15 UTC] eugene dot ware at nextharbour dot com
This bug seems to be present with PHP 4.4.7 even though it looks like these patches have been applied to it.

In particular, posting a multipart form containing a file as one of the parts that has 0 or NULL characters in it stuffs up and the $_FILES array is not populated, and reading from php://input seems to truncate the data (losing a large part of the start of the data).

Is this bug still open?
 [2008-07-11 21:22 UTC] jani@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC