Commit 3f3b036d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use public_send

parent 03bec6b0
......@@ -49,8 +49,7 @@ module Gitlab
elsif Service.available_services_names.include?(underscored_service)
# We treat underscored_service as a trusted input because it is included
# in the Service.available_services_names whitelist.
service_method = "#{underscored_service}_service"
service = project.send(service_method)
service = project.public_send("#{underscored_service}_service")
service && service.activated? && service.valid_token?(password)
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