[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18352] Re: The new concept of 'trust'

From: "Shugo Maeda" <shugo@...>
Date: 2008-08-20 07:56:28 UTC
List: ruby-core #18352
Hi,

2008/8/20 Dave Thomas <dave@pragprog.com>:
> Thanks for the explanation. What does it mean when you say "objects created
> by untrusted code are tainted and untrusted?" I tried:

It means objects created at safe level 4. For example.

irb(main):001:0> x = lambda { $SAFE=4; Object.new}.call
=> #<Object:0x83d1c58>
irb(main):002:0> x.tainted?
=> true
irb(main):003:0> x.untrusted?
=> true

> Is there an example of a sandbox that uses trust?

At safe level 4, only objects created at safe level 4 or marked as untrusted
manually are modifiable.

irb(main):001:0> p lambda { $SAFE=4; s = ""; s << "xxx"; s }.call
"xxx"
=> "xxx"
irb(main):002:0> $s = ""
=> ""
irb(main):003:0> p lambda { $SAFE=4; $s << "xxx"; $s }.call
SecurityError: Insecure: can't modify string
        from (irb):3:in `block (8 levels) in irb_binding'
        from (irb):3:in `call'
        from (irb):3
        from /home/shugo/local/bin/irb-trunk:12:in `<main>'
irb(main):004:0> $s.taint
=> ""
irb(main):005:0> p lambda { $SAFE=4; $s << "xxx"; $s }.call
SecurityError: Insecure: can't modify string
        from (irb):5:in `block (11 levels) in irb_binding'
        from (irb):5:in `call'
        from (irb):5
        from /home/shugo/local/bin/irb-trunk:12:in `<main>'
irb(main):006:0> $s.untrust
=> ""
irb(main):007:0> p lambda { $SAFE=4; $s << "xxx"; $s }.call
"xxx"
=> "xxx"

-- 
Shugo Maeda

In This Thread

Prev Next