[#4479] Requesting addition to IRB (configurable standard output) — Sascha Ebach <se@...>

Hello,

13 messages 2005/02/24
[#4482] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/25

Quoting se@digitale-wertschoepfung.de, on Fri, Feb 25, 2005 at 01:22:34AM +0900:

[#4483] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/25

On 24 Feb 2005, at 19:51, Sam Roberts wrote:

[#4488] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/26

Quoting drbrain@segment7.net, on Sat, Feb 26, 2005 at 02:43:31AM +0900:

[#4489] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/26

On 25 Feb 2005, at 16:03, Sam Roberts wrote:

SecurityError on Method#call? (might be DRb specific)

From: Florian Gro<florgro@...>
Date: 2005-02-14 21:20:06 UTC
List: ruby-core #4431
Moin.

I've recently having trouble with these kind of errors:

> SecurityError in  Member#list
>  
> Insecure operation `write' at level 4

I'm basically using .call on a DRb proxied method to invoke it. $SAFE is 
0 in both the server and the client script. The proxy object isn't 
tainted. (I'm untainting it and doing a .tainted?() check that always 
returns false even before I untaint it.) The server is running in a CGI 
environment, but I think that's not relevant.

The method comes from a Module defined in the source code in the usual way:

module Handlers
   extend self

   def breakpoint_handler(workspace, message)
     ...
   end

   def eval_handler(code)
     ...
   end

   ...
end

And I'm setting them like this:

service.eval_handler = Handlers.method(:eval_handler)

So what I'm asking is: Is there any other reason why a method would 
suddenly be executed in a $SAFE == 4 context or a way a method could get 
tainted when running with $SAFE == 0 at all?

I initially thought that this would not happen at all unless you 
manually set $SAFE, but it appears that this happens for tainted methods 
even in $SAFE == 0.

I can not reproduce the problem locally, but some users of the 
breakpoint library where this trouble can reproduce it reliably, so I'll 
be able to pass along further questions.

Thanks a lot for any information that might help with this problem. I'm 
unfortunately running out of ideas here...

Regards,
Florian Gross


In This Thread

Prev Next