mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add prohphylactic addlashes when evaling query. Props xknown.
git-svn-id: https://develop.svn.wordpress.org/trunk@8510 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -110,7 +110,7 @@ class WP {
|
||||
$query = preg_replace("!^.+\?!", '', $query);
|
||||
|
||||
// Substitute the substring matches into the query.
|
||||
eval("\$query = \"$query\";");
|
||||
eval("\$query = \"" . addslashes($query) . "\";");
|
||||
$this->matched_query = $query;
|
||||
|
||||
// Parse the query.
|
||||
|
||||
@@ -152,7 +152,7 @@ function url_to_postid($url) {
|
||||
$query = preg_replace("!^.+\?!", '', $query);
|
||||
|
||||
// Substitute the substring matches into the query.
|
||||
eval("\$query = \"$query\";");
|
||||
eval("\$query = \"" . addslashes($query) . "\";");
|
||||
// Filter out non-public query vars
|
||||
global $wp;
|
||||
parse_str($query, $query_vars);
|
||||
|
||||
Reference in New Issue
Block a user