From 7ca423d4493c7fda8f598afbf0948f6b1119b713 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 6 May 2015 06:58:24 +0000 Subject: [PATCH] The UTF-8 regex can occasionally fail on very low memory machines. Reduce the amount of memory it uses. See #32204. Built from https://develop.svn.wordpress.org/trunk@32375 git-svn-id: http://core.svn.wordpress.org/trunk@32345 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 2 +- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index ffe2a07395..0779010dce 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1218,7 +1218,7 @@ function wp_sanitize_redirect($location) { | \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences 11110xxx 10xxxxxx * 3 | [\xF1-\xF3][\x80-\xBF]{3} | \xF4[\x80-\x8F][\x80-\xBF]{2} - ){1,50} # ...one or more times + ){1,40} # ...one or more times )/x'; $location = preg_replace_callback( $regex, '_wp_sanitize_utf8_in_redirect', $location ); $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()]|i', '', $location); diff --git a/wp-includes/version.php b/wp-includes/version.php index 9212781ef5..37f3189cc1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32374'; +$wp_version = '4.3-alpha-32375'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 91b21b7599..e749f517c4 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2654,7 +2654,7 @@ class wpdb { '; } - $regex .= '){1,50} # ...one or more times + $regex .= '){1,40} # ...one or more times ) | . # anything else /x';