diff options
author | Jeremy Evans <[email protected]> | 2019-09-24 20:59:12 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2019-11-18 01:00:25 +0200 |
commit | ffd0820ab317542f8780aac475da590a4bdbc7a8 (patch) | |
tree | 6a5d774933c15fd2b9ea948bd3ae2fa587faaf82 /variable.c | |
parent | c5c05460ac20abcbc0ed686eb4acf06da7a39a79 (diff) |
Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind
version guards. This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2476
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/variable.c b/variable.c index 825f2d6271..4b3b172833 100644 --- a/variable.c +++ b/variable.c @@ -543,9 +543,6 @@ rb_f_trace_var(int argc, const VALUE *argv) return rb_f_untrace_var(argc, argv); } entry = rb_global_entry(rb_to_id(var)); - if (OBJ_TAINTED(cmd)) { - rb_raise(rb_eSecurityError, "Insecure: tainted variable trace"); - } trace = ALLOC(struct trace_var); trace->next = entry->var->trace; trace->func = rb_trace_eval; @@ -1968,10 +1965,6 @@ rb_autoload_str(VALUE mod, ID id, VALUE file) DATA_PTR(av) = tbl = st_init_numtable(); } - if (OBJ_TAINTED(file)) { - file = rb_str_dup(file); - FL_UNSET(file, FL_TAINT); - } file = rb_fstring(file); if (!autoload_featuremap) { autoload_featuremap = rb_ident_hash_new(); |