Skip to content

Commit

Permalink
filter_api: ensure that the free_text where clauses are always ANDed
Browse files Browse the repository at this point in the history
Fixes #15573: One query can be issued via current Mantis interface to
take down site
  • Loading branch information
rombert committed Mar 12, 2013
1 parent 8afbd34 commit 543ba01
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/filter_api.php
Expand Up @@ -1996,8 +1996,7 @@ function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p
# add text query elements to arrays
if ( !$t_first ) {
$t_from_clauses[] = "$t_bug_text_table";
$t_where_clauses[] = "$t_bug_table.bug_text_id = $t_bug_text_table.id";
$t_where_clauses[] = $t_textsearch_where_clause;
$t_where_clauses[] = "$t_bug_table.bug_text_id = $t_bug_text_table.id AND $t_textsearch_where_clause";
$t_join_clauses[] = " LEFT JOIN $t_bugnote_table ON $t_bug_table.id = $t_bugnote_table.bug_id";
$t_join_clauses[] = " LEFT JOIN $t_bugnote_text_table ON $t_bugnote_table.bugnote_text_id = $t_bugnote_text_table.id";
}
Expand Down

0 comments on commit 543ba01

Please sign in to comment.