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 f5ac454 commit 45f9e74
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 @@ -3395,7 +3395,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
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 @@ -233,7 +233,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 45f9e74

Please sign in to comment.