Actions
Feature #6409
closedpublic_send is easily bypassed
Feature #6409:
public_send is easily bypassed
Description
=begin
(({public_send})) can easily be bypassed, by using it to call (({send})). (({public_send})) should explicitly not allow calling (({send})).
class Test
private
def secret
"top secret"
end
end
t = Test.new
t.public_send(:secret)
# => NoMethodError: private method `secret' called for #<Test:0x0000000159b950>
t.public_send(:send, :secret)
# => "top secret"
t.public_send(:send, :exec, "rm -rf ~")
=end
Actions