Skip to content

Commit

Permalink
core: fix a problem where a search could result in illegal SQL
Browse files Browse the repository at this point in the history
This could happen if a query without any search arguments was used and a clause was added to restrict results for certain users.
  • Loading branch information
mworrell committed Aug 22, 2022
1 parent 7f375df commit af37a39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/support/z_search.erl
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,7 @@ publish_check(Alias, #search_sql{extra=Extra}) ->
[];
false ->
[
" and "
, Alias, ".is_published = true and "
Alias, ".is_published = true and "
, Alias, ".publication_start <= now() and "
, Alias, ".publication_end >= now()"
]
Expand Down

0 comments on commit af37a39

Please sign in to comment.