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.
This commit is contained in:
parent
dbb284de5a
commit
a1c216e5e4
3 changed files with 4 additions and 4 deletions
|
@ -10,8 +10,8 @@ module Clusters
|
||||||
end
|
end
|
||||||
|
|
||||||
def builder
|
def builder
|
||||||
cluster.method("application_#{application_name}").call ||
|
cluster.public_send(:"application_#{application_name}") || # rubocop:disable GitlabSecurity/PublicSend
|
||||||
cluster.method("build_application_#{application_name}").call
|
cluster.public_send(:"build_application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ module Clusters
|
||||||
private
|
private
|
||||||
|
|
||||||
def builder
|
def builder
|
||||||
cluster.method("application_#{application_name}").call
|
cluster.public_send(:"application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ module Clusters
|
||||||
end
|
end
|
||||||
|
|
||||||
def builder
|
def builder
|
||||||
cluster.method("application_#{application_name}").call
|
cluster.public_send(:"application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue