[ruby-cvs:78223] c5c05460ac (master): Warn on access/modify of $SAFE, and remove effects of modifying $SAFE

"Jeremy Evans" <[email protected]>
Newsgroups gmane.comp.lang.ruby.cvs
Message-ID <[email protected]>
Jeremy Evans	2019-09-21 11:06:22 +0900 (Sat, 21 Sep 2019)

  New Revision: c5c05460ac

  https://github.com/ruby/ruby/commit/c5c05460ac

  Log:
    Warn on access/modify of $SAFE, and remove effects of modifying $SAFE
    
    This removes the security features added by $SAFE = 1, and warns for access
    or modification of $SAFE from Ruby-level, as well as warning when calling
    all public C functions related to $SAFE.
    
    This modifies some internal functions that took a safe level argument
    to no longer take the argument.
    
    rb_require_safe now warns, rb_require_string has been added as a
    version that takes a VALUE and does not warn.
    
    One public C function that still takes a safe level argument and that
    this doesn't warn for is rb_eval_cmd.  We may want to consider
    adding an alternative method that does not take a safe level argument,
    and warn for rb_eval_cmd.

  Modified files:
    dir.c
    encoding.c
    error.c
    eval.c
    ext/etc/etc.c
    ext/io/console/console.c
    ext/openssl/ossl_rand.c
    ext/openssl/ossl_x509store.c
    ext/readline/readline.c
    ext/socket/constants.c
    ext/socket/raddrinfo.c
    ext/socket/unixsocket.c
    ext/syslog/syslog.c
    ext/win32ole/win32ole.c
    ext/win32ole/win32ole_event.c
    file.c
    gc.c
    hash.c
    include/ruby/intern.h
    include/ruby/ruby.h
    internal.h
    io.c
    iseq.c
    lib/debug.rb
    lib/drb/drb.rb
    lib/erb.rb
    lib/net/smtp.rb
    lib/tempfile.rb
    lib/tmpdir.rb
    load.c
    parse.y
    proc.c
    process.c
    ruby.c
    safe.c
    signal.c
    spec/ruby/language/predefined_spec.rb
    spec/ruby/language/safe_spec.rb
    spec/ruby/optional/capi/string_spec.rb
    test/net/imap/test_imap_response_parser.rb
    test/pathname/test_pathname.rb
    test/readline/test_readline.rb
    test/ruby/test_alias.rb
    test/ruby/test_file.rb
    test/ruby/test_optimization.rb
    test/ruby/test_proc.rb
    test/ruby/test_require.rb
    test/ruby/test_rubyoptions.rb
    test/ruby/test_thread.rb
    test/test_tempfile.rb
    test/test_tmpdir.rb
    test/win32ole/test_win32ole.rb
    test/win32ole/test_win32ole_event.rb
    thread.c
    tool/lib/leakchecker.rb
    transcode.c
    variable.c
    vm_core.h
    vm_eval.c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.