Skip Menu |

This queue is for tickets about the CGI-Lite CPAN distribution.

Report information
The Basics
Id: 99294
Status: resolved
Worked: 30 min
Priority: 0/
Queue: CGI-Lite

People
Owner: HOUSTON [...] cpan.org
Requestors: HOUSTON [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2.0
  • 2.001
  • 2.001-emergencyrelease
  • 2.02
  • 2.03
  • 2.03_01
  • 2.03_02
  • 2.04
Fixed in: 2.04_01



Subject: Upload of multiple files can fail because headers become broken
There is a bug in the current mechanism for handling file uploads. If there are multiple files being uploaded and the buffer ends in the middle of the headers of one of the files, the boundary is silently disposed of and the contents of the second file (headers included) are appended to the contents of the previous file. The mechanism for detecting the combination of the boundary and the headers needs to be changed to account for the possibility that the headers straddle the buffer endpoint.
The logic regarding the situation where the buffer end falls in the headers of one of the uploaded files has been refactored to accommodate these possibilities. The test suite has also been extended to test these uploads for a wide range of buffer sizes which should cover all possibilities given the new test data.