#37488 [Opn->Bgs]: Modifing GPC values
| From: | serkan dot kibritoglu at gmail dot com | Date: | Sun, 11 Mar 2007 08:23:01 +0000 |
| Subject: | #37488 [Opn->Bgs]: Modifing GPC values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110184@lists.php.net to get a copy of this message | ||
ID: 37488
User updated by: serkan dot kibritoglu at gmail dot com
Reported By: serkan dot kibritoglu at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: winXP
PHP Version: 5.2.0
New Comment:
I am terribly sorry.
Since the $value contains original, this was such an amateurish bug
report.
Previous Comments:
------------------------------------------------------------------------
[2007-03-11 07:34:31] serkan dot kibritoglu at gmail dot com
I am sorry to re-open this bug but it is very very similar to this
one.
Reproduce code:
---------------
foreach($_POST as $key => $value) {
$_POST[$key] = trim($value);
$_POST[$key] = strip_tags($value);
$_POST[$key] = mysql_real_escape_string($value);
}
Expected result:
----------------
The code above should; trim, strip_tags and mysql_real_escape_string to
the original values but it only applies the last function in foreach,
which is mysql_real_escape_string.
When i replace the trim() line to the end, it only trims and so on..
I think same goes for _GET and _COOKIE values as well.
------------------------------------------------------------------------
[2006-06-05 16:02:40] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Only the actual values supplied via GPC can be imported.
------------------------------------------------------------------------
[2006-05-18 07:01:11] serkan dot kibritoglu at gmail dot com
Description:
------------
Very simple logic. Here you go;
Reproduce code:
---------------
if($_GET['param']=='') $_GET['param'] = "I am changed
forever.";
echo "Should print: " . $_GET['param'] . "<br>\n";
import_request_variables("g", "g_");
echo "And... !: " . $g_param . "<br>\n";
Expected result:
----------------
Should print: I am changed forever.
And... !: I am changed forever.
Actual result:
--------------
Should print: I am changed forever.
And... !:
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37488&edit=1