Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
19 Dec 2003 at 02:04 UTC
Updated:
2 Jan 2004 at 11:20 UTC
The _fix_gpc_magic function in current cvs zip file (19/dic/2003) is useless....
I put some fixes for it and now seem to works fine.
--- common.inc Thu Dec 18 22:00:07 2003
+++ /var/www/drupal/includes/common.inc Fri Dec 19 02:48:23 2003
@@ -142,16 +142,19 @@
}
}
+
function _fix_gpc_magic(&$item, $key) {
if (is_array($item)) {
- array_walk($item, '_fix_gpc_magic_array');
+ array_walk($item, '_fix_gpc_magic');
+ }
+ else {
+ $item = stripslashes($item);
}
- $item = stripslashes($i);
}
function fix_gpc_magic() {
static $fixed = false;
- if ($fixed && ini_get("magic_quotes_gpc")) {
+ if (!$fixed && ini_get("magic_quotes_gpc")) {
array_walk($_GET, '_fix_gpc_magic');
array_walk($_POST, '_fix_gpc_magic');
array_walk($_COOKIE, '_fix_gpc_magic');
Comments
Comment #1
Kjartan commentedComment #2
(not verified) commented