Actions
Bug #2223
closedlib/delegate: security model?
Description
=begin
Take the following code:
require 'delegate'
cat = "cat"
dog = SimpleDelegator.new("dog")
cat.untrust
dog.untrust
lambda {$SAFE = 4; cat.upcase!}.call # ==> "CAT"
lambda {$SAFE = 4; dog.upcase!}.call # ==> Security Error
Is that expected?
Maybe #trust, #untrust, #taint and #untaint should both call 'super' and forward the call to getobj?
I'm even less sure as to what to do with #tainted? and #untrusted? for mixed cases (i.e. when self and getobj have different taintedness/trust). Disallow these cases? return "super || getobj.tainted?" ?
=end
Actions
Like0
Like0Like0Like0Like0