On servers running PHP <= 5.4 which have magic_quotes_sybase enabled, the superglobals need to be magic-quoted before magic_quotes_sybase is subsequently disabled to avoid incorrect un-slashing. This must surely effect a miniscule number of servers, but so be it.

Fixes #19455
Props summerblue, kurtpayne, lucatume


git-svn-id: https://develop.svn.wordpress.org/trunk@35639 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2015-11-15 22:59:51 +00:00
parent 0792eaf237
commit b32cf6875f
3 changed files with 94 additions and 1 deletions

View File

@@ -603,6 +603,9 @@ function wp_magic_quotes() {
$_COOKIE = stripslashes_deep( $_COOKIE );
}
// Turn off sybase quoting after stripslashes has run
@ini_set( 'magic_quotes_sybase', 0 );
// Escape with wpdb.
$_GET = add_magic_quotes( $_GET );
$_POST = add_magic_quotes( $_POST );