php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #305 File Upload fail when file contain the boundary sequence
Submitted: 1998-04-23 06:17 UTC Modified: 1998-04-29 09:01 UTC
From: bruno dot pennec at der dot edfgdf dot fr Assigned: zeev (profile)
Status: Closed Package: Other
PHP Version: 3.0 Release Candidate 4 OS: unix - all
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 !
Your email address:
MUST BE VALID
Solve the problem:
39 + 28 = ?
Subscribe to this entry?

 
 [1998-04-23 06:17 UTC] bruno dot pennec at der dot edfgdf dot fr
It happens some times, especially when HTTP client uses short boundaries
(for example libW3Perl based clients).

The basic boundary with LibW3Perl is 'OOO', and this is what happen when
the file 'toto.txt'.
toto.txt:
|  hello
|  there is a 000 sequence
|  in my file

The test request is the example file upload given in the php2 manual.
the result is :

<br>
<b>Warning</b>:  File Upload Mime headers garbled [equen] in
<b>/usr/local/www/htdocs/test/upload.php3</b> on line <b>1</b><br>
HTTP/1.1 200 OK
Date: Thu, 23 Apr 1998 08:54:16 GMT
Server: Apache/1.2.5 PHP/3.0b6
Connection: close, close
Content-Type: text/html
 
<H1> fichier charge : toto.txt</H1>
<hr><Pre>
 
hello
there i
</pre>

The error come from detection of the end or the next boundary which must
begin at the first character of the line and must be preceded with '--'.
This bug exists on both php/fi and php3.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-29 09:01 UTC] zeev
Fixed now.  Confirmed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 11:01:30 2024 UTC