Skip to content

Commit

Permalink
feat: Ensure proper quoting of reverse search string in RecordSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondas committed Dec 2, 2023
1 parent a209c96 commit 2539b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Application/Query/RecordSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function fetchRecords(mixed $search_string, bool $reverse, mixed $reverse
LEFT JOIN users u on z.owner = u.id
WHERE
(records.name LIKE ' . $this->db->quote($search_string, 'text') . ' OR records.content LIKE ' . $this->db->quote($search_string, 'text') .
($reverse ? ' OR records.name LIKE ' . $reverse_search_string . ' OR records.content LIKE ' . $reverse_search_string : '') . ')' .
($reverse ? ' OR records.name LIKE ' . $this->db->quote($reverse_search_string, 'text') . ' OR records.content LIKE ' . $reverse_search_string : '') . ')' .
($permission_view == 'own' ? 'AND z.owner = ' . $this->db->quote($_SESSION['userid'], 'integer') : '') .
($iface_search_group_records ? ' GROUP BY records.name, records.content ' : '') .
' ORDER BY ' . $sort_records_by .
Expand Down

0 comments on commit 2539b5d

Please sign in to comment.