mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Sanitize "cat" query var and cast to int before looking for a category template
git-svn-id: https://develop.svn.wordpress.org/trunk@7586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -519,6 +519,7 @@ class WP_Query {
|
||||
$qv['day'] = (int) $qv['day'];
|
||||
$qv['w'] = (int) $qv['w'];
|
||||
$qv['m'] = (int) $qv['m'];
|
||||
$qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers
|
||||
if ( '' !== $qv['hour'] ) $qv['hour'] = (int) $qv['hour'];
|
||||
if ( '' !== $qv['minute'] ) $qv['minute'] = (int) $qv['minute'];
|
||||
if ( '' !== $qv['second'] ) $qv['second'] = (int) $qv['second'];
|
||||
|
||||
Reference in New Issue
Block a user