[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Bug#25035: File upload sends 2 bytes when given empty file
From:       bf () ez ! no
Date:       2001-05-01 12:02:25
[Download RAW message or body]

Package: konqueror
Version: KDE 2.1.1 
Severity: normal
Installed from:    RedHat RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

I have an form similiar to:
<form action="/uploadbug/" method="post" enctype="multipart/form-data">
<input type="text" name="Name" ><br>
<input type="file"  name="UserFile" ><br>
<input type="submit" value="go" >
</form>

When I print the results sendt from the browser when I click go(upload) without \
supplying a file I get a file with 2 bytes size.

<?
print_r( $HTTP_POST_FILES );
?>

Konqi output:

Array ( [UserFile] => Array ( [name] => [type] => [tmp_name] => /tmp/phpR0iCSC [size] \
=> 2 ) ) 

Netscape output:

Array ( [UserFile] => Array ( [name] => [type] => [tmp_name] => none [size] => 0 ) ) 

This 2 byte data makes php create a file and the file I already have will be \
overwritten since the application thinks I supply a new file, but all I did was \
change other information.

I think this is related to the bug where a \n and a space was sendt to as a preamble \
to all form fields.

(Submitted via bugs.kde.org)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic