diff --git a/libraries/DbQbe.php b/libraries/DbQbe.php index d9d1f3ca21..08eb4cc520 100644 --- a/libraries/DbQbe.php +++ b/libraries/DbQbe.php @@ -1940,7 +1940,10 @@ class DbQbe // sets row count $rows = PMA_ifSetOr($_REQUEST['rows'], 0, 'numeric'); $criteriaRowAdd = PMA_ifSetOr($_REQUEST['criteriaRowAdd'], 0, 'numeric'); - $this->_criteria_row_count = max($rows + $criteriaRowAdd, 0); + $this->_criteria_row_count = min( + 100, + max($rows + $criteriaRowAdd, 0) + ); return $criteriaColumnCount; } diff --git a/libraries/SavedSearches.php b/libraries/SavedSearches.php index ccbd9c5f95..6c2c0c29e1 100644 --- a/libraries/SavedSearches.php +++ b/libraries/SavedSearches.php @@ -160,6 +160,16 @@ class SavedSearches } } + /* Limit amount of rows */ + if (!isset($data['rows'])) { + $data['rows'] = 0; + } else { + $data['rows'] = min( + max(0, intval($data['rows'])), + 100 + ); + } + for ($i = 0; $i <= $data['rows']; $i++) { $data['Or' . $i] = $criterias['Or' . $i]; }