Ticket #17737: 17737.2.patch
File 17737.2.patch, 1.5 KB (added by , 13 years ago) |
---|
-
wp-includes/query.php
1731 1731 1732 1732 // Category stuff 1733 1733 if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && $this->query_vars_changed ) { 1734 $q['cat'] = ''.urldecode($q['cat']).'';1735 $q['cat'] = addslashes_gpc( $q['cat']);1736 $cat_array = preg_split( '/[,\s]+/', $q['cat']);1734 $q['cat'] = urldecode( (string) $q['cat'] ); 1735 $q['cat'] = addslashes_gpc( $q['cat'] ); 1736 $cat_array = preg_split( '/[,\s]+/', $q['cat'] ); 1737 1737 $q['cat'] = ''; 1738 1738 $req_cats = array(); 1739 1739 foreach ( (array) $cat_array as $cat ) { … … 2273 2273 if ( empty($q['author']) || ($q['author'] == '0') ) { 2274 2274 $whichauthor = ''; 2275 2275 } else { 2276 $q['author'] = (string)urldecode($q['author']);2277 $q['author'] = addslashes_gpc( $q['author']);2276 $q['author'] = urldecode( (string) $q['author'] ); 2277 $q['author'] = addslashes_gpc( $q['author'] ); 2278 2278 if ( strpos($q['author'], '-') !== false ) { 2279 2279 $eq = '!='; 2280 2280 $andor = 'AND'; … … 2335 2335 $allowed_keys[] = 'meta_value'; 2336 2336 $allowed_keys[] = 'meta_value_num'; 2337 2337 } 2338 $q['orderby'] = urldecode( $q['orderby']);2339 $q['orderby'] = addslashes_gpc( $q['orderby']);2338 $q['orderby'] = urldecode( (string) $q['orderby'] ); 2339 $q['orderby'] = addslashes_gpc( $q['orderby'] ); 2340 2340 2341 2341 $orderby_array = array(); 2342 2342 foreach ( explode( ' ', $q['orderby'] ) as $i => $orderby ) {