SECURITY: Avoid the use of Object#send in Onebox::Engine::StandardEmbed

Use `Object#public_send` instead which is much safer
This commit is contained in:
Alan Guo Xiang Tan 2024-05-23 09:48:54 +08:00 committed by Nat
parent 311b737c91
commit 10afe5fcf1
No known key found for this signature in database
GPG Key ID: 4938B35D927EC773

View File

@ -161,7 +161,7 @@ module Onebox
def set_from_normalizer_data(normalizer)
normalizer.data.each do |k, _|
v = normalizer.send(k)
v = normalizer.public_send(k)
@raw[k] ||= v unless v.nil?
end
end