Commit ff8a1b64 by thanhnd

using solr_escape to avoid SOLR injection

parent 8e20a43b
Pipeline #603 failed with stages
in 0 seconds
......@@ -9,9 +9,8 @@ class Solr
# send a request to /select
def query (cond,page)
#response = solr.get 'select', :params => {:q => "job_name:#{cond}", :start => 0, :rows => 1000}
response = solr.paginate page, 10, 'select', :params => {:q => "job_name:#{cond}"}
#response.paginate 1, 10
str = RSolr.solr_escape(cond)
response = solr.paginate page, 10, 'select', :params => {:q => "job_name:#{str}"}
response['response']['docs']
end
end
\ No newline at end of file
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