Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_thanhnd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
thanhnd
venjob_thanhnd
Commits
ff8a1b64
Commit
ff8a1b64
authored
May 06, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using solr_escape to avoid SOLR injection
parent
8e20a43b
Pipeline
#603
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/solr.rb
+3
-3
No files found.
lib/solr.rb
View file @
ff8a1b64
...
@@ -9,9 +9,8 @@ class Solr
...
@@ -9,9 +9,8 @@ class Solr
# send a request to /select
# send a request to /select
def
query
(
cond
,
page
)
def
query
(
cond
,
page
)
#response = solr.get 'select', :params => {:q => "job_name:#{cond}", :start => 0, :rows => 1000}
str
=
RSolr
.
solr_escape
(
cond
)
response
=
solr
.
paginate
page
,
10
,
'select'
,
:params
=>
{
:q
=>
"job_name:
#{
cond
}
"
}
response
=
solr
.
paginate
page
,
10
,
'select'
,
:params
=>
{
:q
=>
"job_name:
#{
str
}
"
}
#response.paginate 1, 10
response
[
'response'
][
'docs'
]
response
[
'response'
][
'docs'
]
end
end
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment