#30527 [NEW]: magic_quotes_gpc does not work per-directory
| From: | andrew at crannog-software dot com | Date: | Fri, 22 Oct 2004 09:43:26 +0000 |
| Subject: | #30527 [NEW]: magic_quotes_gpc does not work per-directory | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-67940@lists.php.net to get a copy of this message | ||
From: andrew at crannog-software dot com
Operating system: Windows 2000
PHP version: 4.3.9
PHP Bug Type: PHP options/info functions
Bug description: magic_quotes_gpc does not work per-directory
Description:
------------
When magic_quotes_gpc is controlled per-directory through the registry,
the return code from get_magic_quotes_gpc() reflects the change, but the
contents of $_GET, $_POST and $_COOKIE remain escaped or not escaped
according to the setting in php.ini.
The code below was run with magic_quotes_gpc=on in php.ini and
magic_quotes_gpc="0" in the registry for the folder in which the script
resides.
Reproduce code:
---------------
<html>
<body>
magic_quotes_gpc is <?php echo get_magic_quotes_gpc() ? "on" : "off";
?><br />
text: <?php echo $_REQUEST['text']; ?><br />
<form action="test.php">
<input name="text" /> <input type="submit" />
</form>
</body>
</html>
Expected result:
----------------
magic_quotes_gpc is off
text: "test"
Actual result:
--------------
magic_quotes_gpc is off
text: \"test\"
--
Edit bug report at http://bugs.php.net/?id=30527&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30527&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30527&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30527&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30527&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30527&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30527&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30527&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30527&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30527&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30527&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30527&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30527&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30527&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30527&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30527&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30527&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30527&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30527&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30527&r=mysqlcfg