Bug 27623

Summary: Bad: php-4.0.4pl1-3 doesn't handle correctly forms with enctype=multipart/form-data
Product: [Retired] Red Hat Linux Reporter: Luis Mineiro <luis>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: adam, dnehring, garyw
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.hiperbock.org/teste.php
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-08 00:00:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Script demonstrating incorrect operation
none
Script which triggers the bug none

Description Luis Mineiro 2001-02-14 15:20:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)


Bad: The php-4.0.4pl1-quotes.patch patch applied to the latest RPM (php-
4.0.4pl1-3.i386.rpm) results in incorrect form processing.

When a form with enctype=multipart/form-data is "posted", all of that form 
variables are prepended with an extra \r. This is a problem not only with 
text type field, but also to the field with file to be uploaded.

Reproducible: Always
Steps to Reproduce:
1. install or update php to php-4.0.4pl1-3
2. create a simple script with some text fields and an "upload file" option
3. enter some data on those fields, POST the form and check their values 
and lenghts.
	

Actual Results:  I got an extra \r prepended to text fields and Content-
Type = null with the MIME type for the file field.

Expected Results:  Correct file recognition and text fields with the 
values the user entered, without the extra \r's

I am using the latest RPMs from official RedHat's FTP (updates.redhat.com)

Comment 1 Luis Mineiro 2001-02-14 15:26:37 UTC
Created attachment 10023 [details]
Script demonstrating incorrect operation

Comment 2 Dirk Nehring 2001-03-16 17:35:33 UTC
Created attachment 12804 [details]
Script which triggers the bug

Comment 3 Dirk Nehring 2001-03-16 17:36:40 UTC
Me too, the latest redhat patch is broken and should be dropped.

Comment 4 Need Real Name 2001-06-09 16:29:05 UTC
Just tried fixing this with PHP 4.0.5 and the problem is still there. PHP was 
compiled with the following ./configure:

./configure --prefix=/usr --with-config-file-path=/etc --disable-debug --enable-
pic --enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs --
with-exec-dir=/usr/bin --with-regex=system --enable-debugger --enable-magic-
quotes --enable-safe-mode --enable-sockets --enable-track-vars --with-
mysql=shared,/usr --enable-trans-sid

Comment 5 Phil Copeland 2002-05-09 19:23:50 UTC
php-4.0.6-13