Commit 9e97f3b4 authored by Kristjan Kruus's avatar Kristjan Kruus

Merge pull request #32 in RIHA/riha-browser from...

Merge pull request #32 in RIHA/riha-browser from bugfix/RIHAKB-823-riha-kasutajana-soovin-et-seoste-lisamisel-toimiks-autocomplete-i-sortimine to develop

* commit '7cab1298':
  fixed SQL injection bug
parents 2dadfecc 7cab1298
......@@ -63,8 +63,8 @@ public class InfoSystemController {
public ResponseEntity autocomplete(@RequestParam("searchTerm") String searchTerm) {
PageRequest pageable = new PageRequest(0, 10);
FilterRequest shortNameExact = new FilterRequest("short_name,ilike," + searchTerm, "desc", "id");
FilterRequest nameExact = new FilterRequest("name,ilike," + searchTerm, "desc", "id");
FilterRequest shortNameExact = new FilterRequest("short_name,ilike,'" + searchTerm + "'", "desc", "id");
FilterRequest nameExact = new FilterRequest("name,ilike,'" + searchTerm+"'", "desc", "id");
FilterRequest nameFuzzy = new FilterRequest("name,ilike,%" + searchTerm + "%", "desc", "id");
List<InfoSystem> foundResults = new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment