#33904 [Ctl->Csd]: magic quotes added to posted array keys even when magic_quotes_gpc is off
| From: | iliaa@php.net | Date: | Fri, 29 Jul 2005 15:44:04 +0000 |
| Subject: | #33904 [Ctl->Csd]: magic quotes added to posted array keys even when magic_quotes_gpc is off | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82676@lists.php.net to get a copy of this message | ||
ID: 33904
Updated by: iliaa@php.net
Reported By: php at kanariepiet dot com
-Status: Critical
+Status: Closed
Bug Type: *General Issues
Operating System: *
PHP Version: 5CVS-2005-07-29
Previous Comments:
------------------------------------------------------------------------
[2005-07-28 17:20:03] tony2001@php.net
See also bug #29165.
------------------------------------------------------------------------
[2005-07-28 17:04:23] php at kanariepiet dot com
php5-200507281430 gives the same results as php-5.0.4:
<?php
print_r ($_POST);
?>
<form method="post">
<input type="text" name="foo'bar" value="bar'foo">
</form>
returns
Array (
[foo\'bar] => bar'foo
)
------------------------------------------------------------------------
[2005-07-28 16:34:20] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-28 16:30:33] php at kanariepiet dot com
phpinfo() show that magic quotes are turned off.
As stated above, value parts are left alone. The following
code returns Array ( [test] => foo'bar ) as expected, so the
settings are ok.
<?php print_r ($_POST); ?>
<form method="post">
<input type="text" name="test" value="foo'bar">
</form>
------------------------------------------------------------------------
[2005-07-28 16:26:57] php at kanariepiet dot com
To be more precies:
The quotes in the value parts of the $_POST array are left
alone (good), but the quotes in the key parts of the $_POST
array are preceeded with slashes (wrong).
------------------------------------------------------------------------
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/33904
--
Edit this bug report at http://bugs.php.net/?id=33904&edit=1