mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:17:08 +08:00
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.
This commit is contained in:
parent
28842d24d6
commit
690036225f
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user