Make WordPress Core


Ignore:
Timestamp:
04/02/2008 01:15:21 PM (16 years ago)
Author:
markjaquith
Message:

Sanitize "cat" query var and cast to int before looking for a category template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/query.php

    r7531 r7586  
    520520        $qv['w'] = (int) $qv['w'];
    521521        $qv['m'] =  (int) $qv['m'];
     522        $qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers
    522523        if ( '' !== $qv['hour'] ) $qv['hour'] = (int) $qv['hour'];
    523524        if ( '' !== $qv['minute'] ) $qv['minute'] = (int) $qv['minute'];
Note: See TracChangeset for help on using the changeset viewer.