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 10:00:16 +08:00 committed by Nat
parent 26aef0c288
commit 6ce5673d2c
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