Commit 6d8b0bbb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Jacob Vosmaer

Correctly escape search query

parent 8a5bf011
...@@ -6,7 +6,8 @@ class SearchContext ...@@ -6,7 +6,8 @@ class SearchContext
end end
def execute def execute
query = Shellwords.shellescape(params[:search]) query = params[:search]
query = Shellwords.shellescape(query) if query.present?
return result unless query.present? return result unless query.present?
......
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