Permalink
Browse files

filter_api: ensure that the free_text where clauses are always ANDed

Fixes #15573: One query can be issued via current Mantis interface to
take down site
  • Loading branch information...
1 parent 0719f32 commit 540ae4714fb5bf9ae517db66be8accfe823eeed0 @rombert rombert committed Mar 7, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 core/filter_api.php
View
@@ -2021,8 +2021,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";
}

0 comments on commit 540ae47

Please sign in to comment.