ID:               45515
 Updated by:       [EMAIL PROTECTED]
 Reported By:      andresipm at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: windows XP
 PHP Version:      5.2.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




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

[2008-07-14 22:46:36] andresipm at yahoo dot com

Description:
------------
In the form enter a string with a quote anywhere. Clic several times
the submit button.

In the next code, it is supposed that the user will never excecute the
addslashes() function inside the if statement.

However, the value of the $_POST variable is changed and added
slashes!!!!

Reproduce code:
---------------
<?php
if( false ){
    $sss=       $_POST["nameP"];
        $sss= addslashes( $sss );
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>nooh shit</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
  Enter the string "any'string" and send:<input name="nameP"
type="text" value="<?=$_POST["nameP"]?>" />
  <input type="submit" name="enviar" id="enviar" value="Send" />
</form>
</body>
</html>

Expected result:
----------------
The expected result is that the $_POST variable keep its value:

original string: any'string
several submits later: any'string



Actual result:
--------------
The actual result is something like this:

original string: any'string
several submits later: any\\\\\\\\\\'string


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


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

Reply via email to