Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Thread.abort_on_exception= should raise SecurityError when $SAFE is 4

  • Loading branch information...
commit 2982681462a55d4fc3c099b86e62d63def80ce4c 1 parent 756cc28
@Watson1978 Watson1978 authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  thread.c
View
2  thread.c
@@ -577,6 +577,7 @@ rb_thread_s_abort_exc(VALUE rcv, SEL sel)
static VALUE
rb_thread_s_abort_exc_set(VALUE self, SEL sel, VALUE val)
{
+ rb_secure(4);
rb_vm_set_abort_on_exception(RTEST(val));
return val;
}
@@ -608,6 +609,7 @@ rb_thread_abort_exc(VALUE thread, SEL sel)
static VALUE
rb_thread_abort_exc_set(VALUE thread, SEL sel, VALUE val)
{
+ rb_secure(4);
GetThreadPtr(thread)->abort_on_exception = RTEST(val);
return val;
}
Please sign in to comment.
Something went wrong with that request. Please try again.