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:
westi
2009-08-20 20:09:36 +00:00
parent d28c67315a
commit 15d31d9644
2 changed files with 93 additions and 3 deletions

View File

@@ -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);