summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-08-08 19:31:24 +0000
committerRobert Speicher <robert@gitlab.com>2017-08-08 19:31:24 +0000
commit85c38ddb1dbe56de87d8e98b1cfdd76a0c67838a (patch)
tree90b319cc31dc7b22e989e7c160bab4131cdb2c36 /app/models/project.rb
parentb9da47d3b2c376ef8d0f6a951c0256bbc58b2854 (diff)
parent9770c57fab0315865a33c8b6df269eded0d57b5c (diff)
downloadgitlab-ce-85c38ddb1dbe56de87d8e98b1cfdd76a0c67838a.tar.gz
Merge branch 'add-rubocop-gitlab-security' into 'master'
Add rubocop-gitlab-security gem See merge request !12177
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 1575f38b2ea..7010664e1c8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -415,7 +415,7 @@ class Project < ActiveRecord::Base
union = Gitlab::SQL::Union.new([projects, namespaces])
- where("projects.id IN (#{union.to_sql})")
+ where("projects.id IN (#{union.to_sql})") # rubocop:disable GitlabSecurity/SqlInjection
end
def search_by_title(query)
@@ -825,7 +825,7 @@ class Project < ActiveRecord::Base
if template.nil?
# If no template, we should create an instance. Ex `build_gitlab_ci_service`
- public_send("build_#{service_name}_service")
+ public_send("build_#{service_name}_service") # rubocop:disable GitlabSecurity/PublicSend
else
Service.build_from_template(id, template)
end
@@ -1331,7 +1331,7 @@ class Project < ActiveRecord::Base
end
def append_or_update_attribute(name, value)
- old_values = public_send(name.to_s)
+ old_values = public_send(name.to_s) # rubocop:disable GitlabSecurity/PublicSend
if Project.reflect_on_association(name).try(:macro) == :has_many && old_values.any?
update_attribute(name, old_values + value)