Commit a1c216e5 authored by Dylan Griffith's avatar Dylan Griffith Committed by Stan Hu

Use #public_send instead #method.call

These builder methods are using user provided input inside a public_send
but this is safe to do in this instance because before they are called
we check before calling them that they match an expected application
name.
parent dbb284de
......@@ -10,8 +10,8 @@ module Clusters
end
def builder
cluster.method("application_#{application_name}").call ||
cluster.method("build_application_#{application_name}").call
cluster.public_send(:"application_#{application_name}") || # rubocop:disable GitlabSecurity/PublicSend
cluster.public_send(:"build_application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
end
end
end
......
......@@ -16,7 +16,7 @@ module Clusters
private
def builder
cluster.method("application_#{application_name}").call
cluster.public_send(:"application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
end
end
end
......
......@@ -10,7 +10,7 @@ module Clusters
end
def builder
cluster.method("application_#{application_name}").call
cluster.public_send(:"application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
end
end
end
......
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