Replace eval usage in request processing with new WP_MatchesMapRegex() class usage. See #9602 props hakre.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -299,7 +299,7 @@ function url_to_postid($url) {
|
||||
$query = preg_replace("!^.+\?!", '', $query);
|
||||
|
||||
// Substitute the substring matches into the query.
|
||||
eval("\$query = \"" . addslashes($query) . "\";");
|
||||
$query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
|
||||
// Filter out non-public query vars
|
||||
global $wp;
|
||||
parse_str($query, $query_vars);
|
||||
|
||||
Reference in New Issue
Block a user