Skip to content

Commit 0eb217d

Browse files
committed
Ensure states are escaped as they come from user params
1 parent 8aa8f4c commit 0eb217d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/travis/api/v3/queries/jobs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def for_owner(relation)
3434

3535
def for_user(user)
3636
set_custom_timeout(host_timeout)
37-
jobs = V3::Models::Job.where("jobs.id in (select id from most_recent_job_ids_for_user_repositories_by_states(#{user.id}, '#{states}'))")
37+
jobs = V3::Models::Job.where("jobs.id in (select id from most_recent_job_ids_for_user_repositories_by_states(#{user.id}, ?))", states)
3838

3939
sort filter(jobs)
4040
end

0 commit comments

Comments
 (0)