php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2626 Incorrectly sets upload file variables when file name variable is in an array
Submitted: 1999-10-27 18:53 UTC Modified: 2000-08-06 09:22 UTC
From: c_stach at yahoo dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: Linux (RedHat 6.1)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: c_stach at yahoo dot com
New email:
PHP Version: OS:

 

 [1999-10-27 18:53 UTC] c_stach at yahoo dot com
    When using an HTTP form to upload files PHP incorrectly sets the <variable>_size, <variable>_type, and neglects to set <variable>_name variables when <variable> is in the format of an array (eg, "userfile[$index]" which would expand to something like "userfile[3]").  What actually ends up happening, for example, is userfile[3]_name is not ever set, userfile[3]_type is set correctly, and userfile_size is set to the last encountered size value instead of userfile[3]_size.

    Beyond this problem, I ran into another issue with this.  PHP seemingly incorrectly parses out, for example, a variable in the format "$userfile[$id]_name" which led me to have to do "${userfile[$id]_name"} instead to get around the constraints of the parser.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-28 12:55 UTC] c_stach at yahoo dot com
Instead of  "${userfile[$id]_name"} in the last paragraph, I actually meant ${"userfile[$id]_name"}.

 [2000-08-06 09:22 UTC] rasmus@php.net
This has been fixed in PHP 4
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 17:01:30 2024 UTC