Ticket #10360: 10360.2.diff

File 10360.2.diff, 994 bytes (added by Denis-de-Bernardy, 4 years ago)

alternative approach: slash $_REQUEST

Line 
1Index: wp-settings.php
2===================================================================
3--- wp-settings.php     (revision 11710)
4+++ wp-settings.php     (working copy)
5@@ -588,16 +588,18 @@
6 
7 // If already slashed, strip.
8 if ( get_magic_quotes_gpc() ) {
9-       $_GET    = stripslashes_deep($_GET   );
10-       $_POST   = stripslashes_deep($_POST  );
11-       $_COOKIE = stripslashes_deep($_COOKIE);
12+       $_GET     = stripslashes_deep($_GET    );
13+       $_POST    = stripslashes_deep($_POST   );
14+       $_REQUEST = stripslashes_deep($_REQUEST);
15+       $_COOKIE  = stripslashes_deep($_COOKIE );
16 }
17 
18 // Escape with wpdb.
19-$_GET    = add_magic_quotes($_GET   );
20-$_POST   = add_magic_quotes($_POST  );
21-$_COOKIE = add_magic_quotes($_COOKIE);
22-$_SERVER = add_magic_quotes($_SERVER);
23+$_GET     = add_magic_quotes($_GET    );
24+$_POST    = add_magic_quotes($_POST   );
25+$_REQUEST = add_magic_quotes($_REQUEST);
26+$_COOKIE  = add_magic_quotes($_COOKIE );
27+$_SERVER  = add_magic_quotes($_SERVER );
28 
29 do_action('sanitize_comment_cookies');
30