Skip to content

Commit

Permalink
Merge pull request #1 from silverstripe-security/patch/1/SS-2017-008
Browse files Browse the repository at this point in the history
[SS-2017-008] Fix SQL injection in search engine
  • Loading branch information
Damian Mooyman authored Dec 7, 2017
2 parents 0f8c146 + ada270c commit aa21b10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/MSSQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ public function random()
*/
public function searchEngine($classesToSearch, $keywords, $start, $pageLength, $sortBy = "Relevance DESC", $extraFilter = "", $booleanSearch = false, $alternativeFileFilter = "", $invertedMatch = false)
{
$start = (int)$start;
$pageLength = (int)$pageLength;
if (isset($objects)) {
$results = new ArrayList($objects);
} else {
Expand Down

0 comments on commit aa21b10

Please sign in to comment.