Skip to content

Commit

Permalink
filter api: always treat FILTER_PROPERTY_MATCH_TYPE as an int value
Browse files Browse the repository at this point in the history
Based on @dregad's comments, this follows up on @dhx's fix.

Fixes #15373: XSS vulnerability
  • Loading branch information
rombert committed Jan 18, 2013
1 parent bbc6b4f commit 610da6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/filter_api.php
Expand Up @@ -3400,7 +3400,7 @@ function <?php echo $t_js_toggle_func;?>() {
echo lang_get ('filter_match_all');
}
?>
<input type="hidden" name="match_type" value="<?php echo string_attribute( $t_filter[FILTER_PROPERTY_MATCH_TYPE] )?>"/>
<input type="hidden" name="match_type" value="<?php echo $t_filter[FILTER_PROPERTY_MATCH_TYPE] ?>"/>
</td>
<td colspan="6">&#160;</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion view_all_set.php
Expand Up @@ -202,7 +202,7 @@
$f_note_user_id = array( $f_note_user_id );
}

$f_match_type = gpc_get_string ( FILTER_PROPERTY_MATCH_TYPE, FILTER_MATCH_ALL );
$f_match_type = gpc_get_int( FILTER_PROPERTY_MATCH_TYPE, FILTER_MATCH_ALL );

# these are only single values, even when doing advanced filtering
$f_per_page = gpc_get_int( FILTER_PROPERTY_ISSUES_PER_PAGE, -1 );
Expand Down

0 comments on commit 610da6e

Please sign in to comment.