file handling type error on php upload

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
12 years ago
12 years ago

People

(Reporter: slimpy, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)
Build Identifier: Mozilla/1.0.6

I have a php uploader that only allows public to upload "text/plain" files.    
The code is:    
   
if($fupload_type != "text/plain"){   
   echo "text files only!"  
   exit();  
} else { 
   echo "upload successful!" 
} 
  
from firefox 1.0.6 on windoz xp "text files only!" is always displayed, even  
though an "echo $fupload_type" produces "text/plain".  
  
This works fine in firefox on Linux.  
  
And also works fine on internet explorer.  
  
I had to use alternative code:  
  
if(substr($fupload_name, -3, 3) != "txt")...  
  
to get windoz firefox to work appropriately.  

Reproducible: Always

Steps to Reproduce:
1.  build an uploader using code listed above  
2.  upload a text file 
3.  see that it doesn't work 
  
Actual Results:  
"text files only!" 

Expected Results:  
"upload successful!"
(Reporter)

Comment 1

12 years ago
Using the newer $_FILES array works fine.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
If it's not a Firefox bug, it's INVALID, not FIXED :)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.