From 690036225f633458a28068425cfb4a6e2aed5c0a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 8 Mar 2022 17:13:26 +0100 Subject: [PATCH] DEV: using send can be harmful, public_send is less risky (#16135) I can't see any harmful use case here, especially because only one param can be used ATM. --- app/controllers/admin/site_settings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/site_settings_controller.rb b/app/controllers/admin/site_settings_controller.rb index a17f9c70de6..6dbe7284b0a 100644 --- a/app/controllers/admin/site_settings_controller.rb +++ b/app/controllers/admin/site_settings_controller.rb @@ -34,7 +34,7 @@ class Admin::SiteSettingsController < Admin::AdminController end update_existing_users = params[:update_existing_user].present? - previous_value = SiteSetting.send(id) || "" if update_existing_users + previous_value = SiteSetting.public_send(id) || "" if update_existing_users SiteSetting.set_and_log(id, value, current_user)