[macruby-changes] [5150] MacRuby/trunk/vm_method.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 10 04:06:31 PST 2011
Revision: 5150
http://trac.macosforge.org/projects/ruby/changeset/5150
Author: watson1978 at gmail.com
Date: 2011-01-10 04:06:24 -0800 (Mon, 10 Jan 2011)
Log Message:
-----------
Module#undef_method with untrusted will not throw a SecurityError.
Test Script:
{{{
class T
def foo ; end
end
T.untrust
$SAFE = 4
T.class_eval{ undef_method :foo }
}}}
Modified Paths:
--------------
MacRuby/trunk/vm_method.c
Modified: MacRuby/trunk/vm_method.c
===================================================================
--- MacRuby/trunk/vm_method.c 2011-01-10 12:06:17 UTC (rev 5149)
+++ MacRuby/trunk/vm_method.c 2011-01-10 12:06:24 UTC (rev 5150)
@@ -150,7 +150,7 @@
if (klass == rb_cObject) {
rb_secure(4);
}
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(klass)) {
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(klass)) {
rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'",
rb_id2name(id));
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110110/332b32c3/attachment.html>
More information about the macruby-changes
mailing list