#19848 [Opn->Csd]: Wrong $_REQUEST values ($_FILES appearance is wacky)

From: Date: Fri, 15 Nov 2002 19:38:35 +0000
Subject: #19848 [Opn->Csd]: Wrong $_REQUEST values ($_FILES appearance is wacky)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25005@lists.php.net to get a copy of this message
 ID:               19848
 Updated by:       sniper@php.net
 Reported By:      capelli@in2p3.fr
-Status:           Open
+Status:           Closed
 Bug Type:         HTTP related
 Operating System: *any
 PHP Version:      4.2.3,4,3.0-dev
 Assigned To:      sterling


Previous Comments:
------------------------------------------------------------------------

[2002-11-15 12:45:06] philip@php.net

Until import_request_variables() behavior is discussed in php-dev this
should remain open.  IMHO $_REQUEST and import_request_variables()
should behave the same way as to remain consistent.  As of PHP 4.3.0
$_FILES was only removed from $_REQUEST.

------------------------------------------------------------------------

[2002-11-15 07:44:41] spamlanzz@graffiti.net

not sure if this is important, but import_request_variables imports the
wrong thing.

html:
  <input name="d[text]" value="hello">
  <input type="file" name="d[file]">

code:
  import_request_variables("GP", "__");

result:

$__d = array (
  'name' => array ( 'file' => '' ),
  'type' => array ( 'file' => '' ),
  'tmp_name' => array ( 'file' => '' ),
  'error' => array ( 'file' => 4 ),
  'size' => array ( 'file' => 0 )
)

------------------------------------------------------------------------

[2002-10-27 20:47:21] sterling@php.net

Fixed in CVS... $_FILES is no longer present in $_REQUEST...

------------------------------------------------------------------------

[2002-10-24 18:42:14] mzeitler@accrisoft.com

This test form strips 3 characters from the posted variable:

<FORM METHOD=POST ACTION="">
<INPUT TYPE="text" name="foo[a]"
VALUE="<?=$foo['a']?>">
<INPUT TYPE="submit">
</FORM>

2 dimensional array - this test form strips 8 characters from the
posted variable:

<FORM METHOD=POST ACTION="">
<INPUT TYPE="text" name="foo[a][b]"
VALUE="<?=$foo['a']['b']?>">
<INPUT TYPE="submit">
</FORM>

For every dimension added to the array, another 4 characters are
scripted from the beginning of the posted variable.  Works on PHP
version less than 4.2.2 and earlier.

------------------------------------------------------------------------

[2002-10-20 22:17:12] sniper@php.net

The 'voting' on php-dev was in favour for removing the $_FILES from
$_REQUEST..as it doesn't make much sense
to have them there. Just FYI. :)

--Jani


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19848

-- 
Edit this bug report at http://bugs.php.net/?id=19848&edit=1



Thread (15 messages)

« previous php.bugs (#25005) next »